Change int() so that passing a string, unicode, float or long argument

that is outside the integer range no longer raises OverflowError, but
returns a long object instead.

This fixes SF bug http://www.python.org/sf/635115
This commit is contained in:
Walter Dörwald 2002-11-19 20:49:15 +00:00
parent 7a3bae410d
commit f171540ab8
9 changed files with 82 additions and 49 deletions

View file

@ -507,6 +507,8 @@ def my_import(name):
Otherwise, the argument may be a plain or
long integer or a floating point number. Conversion of floating
point numbers to integers truncates (towards zero).
If the argument is outside the integer range a long object will
be returned instead.
\end{funcdesc}
\begin{funcdesc}{intern}{string}