You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2011-03-03.07:20:45.888>created_at=<Date2011-03-03.05:44:40.307>labels= ['type-bug']
title='pretending the "not" operator is a function behaves surprisingly'updated_at=<Date2011-03-03.17:10:11.202>user='https://bugs.python.org/hhm'
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:
>>> (not1) ==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.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: