Mark Dickinson <[EMAIL PROTECTED]> added the comment:

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.

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2804>
__________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to