[Python-Dev] Int FutureWarnings and other 2.4 TODOs (original) (raw)

Guido van Rossum guido at python.org
Wed Dec 3 12:26:06 EST 2003


> So the question is, does long have operations that int doesn't have? > And if so, why can't those operations be added to int? And if there's > a reason, is it good enough?

Taking into account their difference in representation, a long can support 1<<32, but an int can't.

We're talking about a hypothetical int here where that operation returns 4294967296L. (Not so hypothetical, it's implemented in Python 2.4 in CVS.)

I'm not saying that the "proper" (long) behavior can't be unified into a single type, just giving an example of an operation long supports but int doesn't.

Sorry, your counterexample is rejected. :-)

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list