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 belopolsky, loewis, mark.dickinson
Date 2008-05-10.00:49:40
SpamBayes Score 0.22752117
Marked as misclassified No
Message-id <1210380584.45.0.418668171558.issue2804@psf.upfronthosting.co.za>
In-reply-to
Content
It's the current behaviour that seems arbitrary to me: a >> b is well-
defined, and efficiently computable, for any integer a and nonnegative 
integer b;  it seems odd to have an unnecessary and (from a user's 
viewpoint) arbitrary limit on the size of b.  It's simple to have the 
operation always succeed, and this seems to me like both the least 
surprising, and the most correct, thing to do.

On the other hand, I can't really think of any real-world uses for large 
shifts:  I'm guessing that in applications a shift of more than 63 or so  
must be rare.  So it probably doesn't matter that much one way or 
another.

Changing the limit on the shift to sys.maxsize rather than LONG_MAX 
would seem to make some sense, though.
History
Date User Action Args
2008-05-10 00:49:45mark.dickinsonsetspambayes_score: 0.227521 -> 0.22752117
recipients: + mark.dickinson, loewis, belopolsky
2008-05-10 00:49:44mark.dickinsonsetspambayes_score: 0.227521 -> 0.227521
messageid: <1210380584.45.0.418668171558.issue2804@psf.upfronthosting.co.za>
2008-05-10 00:49:43mark.dickinsonlinkissue2804 messages
2008-05-10 00:49:41mark.dickinsoncreate