Eric V. Smith <e...@trueblade.com> added the comment:

That's not how they're defined. From 
https://docs.python.org/3/reference/expressions.html?highlight=left%20shift#shifting-operations

"A right shift by n bits is defined as floor division by pow(2,n). A left shift 
by n bits is defined as multiplication with pow(2,n)."

Perhaps you are assuming that Python operates on fixed width integers, such as 
8 bit bytes? That's not true. You can think of Python integers as infinitely 
large, up to the limit of how memory you have.

Since it's working as documented, I'm going to close this.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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

Reply via email to