Does Python need a '>>>' operator?
Martin v. Loewis
martin at v.loewis.de
Tue Apr 16 02:23:50 EDT 2002
David Eppstein <eppstein at ics.uci.edu> writes:
> > Yes, but this notion is inherently bound with the notion of "size" of
> > an integer, atleast in the signed variant (for unsigned integers,
> > there is no need for twos complement). If you create the complement,
> > you have to know how many bits to invert.
>
> Not if you have a representation which (when interpreted as a bitvector)
> allows bitvectors with infinitely many one-bits. Which in fact is what
> we have with Python's long integer type.
Unfortunately, you cannot represent such a number in hex, atleast not
under any of the usual conventions: the convention is that you can
strip infinitely many leading zeroes, but stripping off infinitely many
leading ones is confusing.
Regards,
Martin
More information about the Python-list
mailing list