[Zope-Coders] int() returns long in Py2.3.2?
Tim Peters
tim at zope.com
Tue Nov 4 18:00:19 EST 2003
[Chris McDonough]
>> I'm not sure if this is a bug or a feature in Python 2.3.2, but
>> code that calls int() with an argument that is a number > sys.maxint
>> no longer throws an OverflowError as it did in 2.1, 2.2, et. al.
[Fred L. Drake, Jr]
> This is not a bug. Think "integer", not "N-bits", and it makes sense
> that they're all one big happy family.
Still, it's usually fair to call a gross change in behavior "a bug". It's
not appropriate in this particular case because the change in int() behavior
was planned and announced more than 2 years ago, in the "Unifying Long
Integers and Integers" PEP (see esp. the "Buitin-in Functions" section):
http://www.python.org/peps/pep-0237.html
So that's something for Zope to be aware of too: the long-range plan for
Python is to eliminate all user-visible distinctions between the int and
long types. We're somewhere beyond the halfway point of the PEP's
multi-year plan to get there.
More information about the Zope-Coders
mailing list