PEP0238 lament

Tim Peters tim.one at home.com
Wed Jul 25 15:27:39 EDT 2001


[Daniel Fackrell]
> Would this unified number system somehow still be able to provide the
> functionality that ints provide with regard to bitwise operations?
> There may be other problems that arise as well, but I'm too much of a
> newbie to point them out at this time.

These bit-fiddling operators couldn't care less:  & | ^ ~ >>

The problem child is << on (short) ints, which is already a problem because
its behavior varies across Python installations.  Few people seem aware of
that now, because it only bites those running short-int left-shifting Python
on both 32-bit and 64-bit Unixish boxes (Windows boxes are immune, because
MS decided to leave sizeof(long) at 4 even under Win64).





More information about the Python-list mailing list