This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author hhm
Recipients hhm
Date 2011-03-03.05:44:40
SpamBayes Score 1.2282952e-12
Marked as misclassified No
Message-id <1299131080.86.0.627193173962.issue11381@psf.upfronthosting.co.za>
In-reply-to
Content
I'm not sure if this is a bug per se, since I don't think pretending operators are callable is in the docs, but:

pretending an operator (at least the "not" operator) is callable, like so:
not(True)

can be surprising:
>>> (not 1) == 9
False

>>> not(1) == 9
True


Now, I know this is valid because Python is very lenient about whitespace (and the parenthenses are really just  "eval '1' first") , but, this is still confusing behavior to someone who does not know about that.

I think the same problem may be possible in the case of statements.

A possible solution is to make sure there is at least some white-space between "alphabetical" operators and statements.
History
Date User Action Args
2011-03-03 05:44:40hhmsetrecipients: + hhm
2011-03-03 05:44:40hhmsetmessageid: <1299131080.86.0.627193173962.issue11381@psf.upfronthosting.co.za>
2011-03-03 05:44:40hhmlinkissue11381 messages
2011-03-03 05:44:40hhmcreate