Does Python need a '>>>' operator?
Martin v. Loewis
martin at v.loewis.de
Mon Apr 15 10:02:13 EDT 2002
"Ken Peek" <Ken.Peek at SpiritSongDesigns.comNOSPAM> writes:
> 2) Secondly, when we are printing integers in the hex format,
> we are not interested in the sign-- we are looking at the
> bit pattern.
Who is this "we" in this statement? When I print numbers in hex, I'm
interested in the hexadecimal representation if the number. For
*printing* it, I usually don't care what the internal representation
is.
> 3) With unification, the long and the int types should not
> print differently when calling the 'hex()' method.
And indeed, they won't.
> (The 'int' version of this method NEVER has, and shouldn't print a
> minus sign, and _I_ don't think the long version of 'hex()' should
> either. This _is_ what needs to happen to have proper unification.
The PEP currently says differently:
# In most cases the long int semantics will prevail; however, the
# trailing 'L' from long int representations will be dropped.
This clearly says that the long int semantics will prevail.
> 4) We are not using 1.5.2 anymore. We are on 2.2.x now.
> You need to imprint on your brain that there now should be
> _NO_ visible difference (to the programmer) between the long
> and the int type. In fact, the int and long representations
> are now just an implementation detail, and should be hidden,
> and transparent to the programmer.
I completely agree.
> Martin, why do you resist the unification of these two
> types for _ALL_ operations and methods?
Why did you conclude that I resist? I'm just saying that the long
semantics will prevail, not the int semantics.
Regards,
Martin
More information about the Python-list
mailing list