Does Python need a '>>>' operator?

Tim Peters tim.one at comcast.net
Mon Apr 15 12:31:19 EDT 2002


[Greg Ewing]
> The way I see it, if you're doing bit twiddling
> using unified ints/longs, you should always be
> working with *positive* integers, in which case
> the hex representation will always be what
> you want.

Viewing longs as characteristic bit vectors, they model finite and co-finite
sets.  Only finite sets "look positive"; co-finite sets "look negative".  It
doesn't take more than the unary ~ operator to go from one kind to the
other, i.e. if x is a bit set represented as a long, ~x is its complement.






More information about the Python-list mailing list