Author eric.smith
Recipients Nandish, eric.smith
Date 2020-12-22.19:40:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1608666054.25.0.242081495838.issue42720@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-12-22 19:40:54eric.smithsetrecipients: + eric.smith, Nandish
2020-12-22 19:40:54eric.smithsetmessageid: <1608666054.25.0.242081495838.issue42720@roundup.psfhosted.org>
2020-12-22 19:40:54eric.smithlinkissue42720 messages
2020-12-22 19:40:54eric.smithcreate