[issue34850] Emit a syntax warning for "is" with a literal
thautwarm
report at bugs.python.org
Mon Nov 18 00:31:54 EST 2019
thautwarm <yaoxiansamma at gmail.com> added the comment:
What if using identity equality on integer literals is intended?
I'm now trying to speed up the generated code via the integer interning mechanism told by https://docs.python.org/3/c-api/long.html#c.PyLong_FromLong .
I think it okay to not complain when the operand of `is` or `is not` is an integer between -5 and 256.
----------
nosy: +thautwarm
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34850>
_______________________________________
More information about the Python-bugs-list
mailing list