This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients mark.dickinson
Date 2008-05-09.18:17:54
SpamBayes Score 0.00020376204
Marked as misclassified No
Message-id <1210357076.66.0.280536518135.issue2804@psf.upfronthosting.co.za>
In-reply-to
Content
In Python 2.6a3:

>>> 1 >> (2**31)  # unexpected exception
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: long int too large to convert to int
>>> 1 >> (2**31-1)  # works as expected
0L

It might make more sense for the first expression to return 0 instead.
Similarly, perhaps 0 << (2**31) should also return 0.
History
Date User Action Args
2008-05-09 18:17:57mark.dickinsonsetspambayes_score: 0.000203762 -> 0.00020376204
recipients: + mark.dickinson
2008-05-09 18:17:56mark.dickinsonsetspambayes_score: 0.000203762 -> 0.000203762
messageid: <1210357076.66.0.280536518135.issue2804@psf.upfronthosting.co.za>
2008-05-09 18:17:55mark.dickinsonlinkissue2804 messages
2008-05-09 18:17:54mark.dickinsoncreate