[Zope-Coders] int() returns long in Py2.3.2?

Barry Warsaw barry at zope.com
Tue Nov 4 17:19:24 EST 2003


On Tue, 2003-11-04 at 17:18, Chris McDonough wrote:
> 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.
> 
> Tim?  Fred?

True.

>From http://www.python.org/2.3/highlights.html

int() - this can now return a long when converting a string with many
digits, rather than raising OverflowError. (New in 2.3a2: issues a
FutureWarning when sign-folding an unsigned hex or octal literal.)

-Barry





More information about the Zope-Coders mailing list