PEP0238 lament

Tim Peters at
Mon Jul 23 01:08:03 EDT 2001

> Of course, but computer numerics is a massive exercise in picking the
> general rules you want to preserve at the expense of others,
> and trading all that off against pragmatics too.  Not losing information
> silently is also a Very Good General Rule, and even 745 binary fp
> arithmetic is better at meeting that one than current "/".

[Donn Cave]
> So would it make sense to also change the >> and << operators to
> rotate shift?  I mean, I sure wouldn't find that more useful, but
> it does conserve information that the current shifts lose.

First explain what bitstring operations have to do with computer numerics.
You may as well as complain that, e.g., "del a[i]" loses information too.
Well, of course it does -- that's its purpose.  Same thing with >>.  << does
not lose info on longs, and it is indeed a source of bugs that it may lose
info on ints (the result is platform-dependent in Python).

More information about the Python-list mailing list