Stefan Behnel added the comment:

LGTM, can't see a case where this might go wrong (errors and type checks are 
handled before the added code).

It also seems a sufficiently common case to optimise it internally. The 2**n 
spelling is easier to read and to get right than the shifting, so it's good to 
make both similarly fast to remove an excuse for micro optimisations in Python 
code.

----------
nosy: +scoder

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21420>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to