Ned Deily added the comment: 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 ---------- nosy: +ned.deily resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21816> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com