This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients Thomas.Ball, ned.deily
Date 2014-06-20.20:21:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1403295711.14.0.862236428152.issue21816@psf.upfronthosting.co.za>
In-reply-to
Content
In a 32-bit version of Python 2, that value cannot be represented as an 'int' type.

>>> i = 3783907807
>>> type(i)
<type 'long'>

Normally, Python 2 implicitly creates objects of type 'int' or type 'long' as needed.  But in your example, you are forcing type 'int' and you correctly get an exception.  Your example does not fail with a 64-bit version of Python 2 but it would fail with a larger number.  Python 3 does not have this problem because the distinction between the two types has been removed: all Python 3 ints are unlimited precision.

https://docs.python.org/2/library/stdtypes.html#numeric-types-int-float-long-complex
https://docs.python.org/3.4/whatsnew/3.0.html#integers
History
Date User Action Args
2014-06-20 20:21:51ned.deilysetrecipients: + ned.deily, Thomas.Ball
2014-06-20 20:21:51ned.deilysetmessageid: <1403295711.14.0.862236428152.issue21816@psf.upfronthosting.co.za>
2014-06-20 20:21:51ned.deilylinkissue21816 messages
2014-06-20 20:21:50ned.deilycreate