You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2014-06-20.20:21:51.127>created_at=<Date2014-06-20.19:18:11.347>labels= ['type-bug', 'invalid']
title='OverflowError: Python int too large to convert to C long'updated_at=<Date2014-06-20.20:21:51.125>user='https://bugs.python.org/ThomasBall'
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.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: