Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 520e850

Browse files
committed
long() -> int()
1 parent b7f1da5 commit 520e850

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Objects/abstract.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ PyNumber_Long(PyObject *o)
13511351
PyObject *int_instance;
13521352
Py_DECREF(trunc_func);
13531353
/* __trunc__ is specified to return an Integral type,
1354-
but long() needs to return a long. */
1354+
but int() needs to return a int. */
13551355
int_instance = convert_integral_to_int(truncated,
13561356
"__trunc__ returned non-Integral (type %.200s)");
13571357
return int_instance;
@@ -1361,7 +1361,7 @@ PyNumber_Long(PyObject *o)
13611361

13621362
if (PyBytes_Check(o))
13631363
/* need to do extra error checking that PyLong_FromString()
1364-
* doesn't do. In particular long('9.5') must raise an
1364+
* doesn't do. In particular int('9.5') must raise an
13651365
* exception, not truncate the float.
13661366
*/
13671367
return long_from_string(PyBytes_AS_STRING(o),

0 commit comments

Comments
 (0)