[issue21422] int << 0: return the number unmodified
Mark Dickinson
report at bugs.python.org
Mon May 5 10:54:21 CEST 2014
Mark Dickinson added the comment:
BTW, there's also a behaviour change here. Before the patch:
>>> True << 0
1
After the patch:
>>> True << 0
True
Which demonstrates another good reason to avoid trivial-looking optimisations: it's far too easy to accidentally change behaviour.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21422>
_______________________________________
More information about the Python-bugs-list
mailing list