[issue21979] SyntaxError not raised on "0xaor 1"

Mika Eloranta report at bugs.python.org
Mon Jul 14 13:36:53 CEST 2014


Mika Eloranta added the comment:

OK, I see... "0xfand 1" is ambiguous "(0xfa)nd 1" vs. "(0xf)and 1".

So, while a bit weird, the behavior is consistent:

>>> 123not in [], 0xfnot in [], 0xfor 1, 0xafor 1, 0xfin []
(True, True, 15, 175, False)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21979>
_______________________________________


More information about the Python-bugs-list mailing list