diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2013-01-27 10:17:52 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2013-01-27 10:17:52 (GMT) |
commit | 07c71365244ce496042566d94bdd469f7d3b1bf6 (patch) | |
tree | 6de3120c827869ed95aca8c6b034bbbc5d9c61ee /Objects | |
parent | 3a62e45b974611c80ba9e21670cfbfbe2bd193c1 (diff) | |
download | cpython-07c71365244ce496042566d94bdd469f7d3b1bf6.zip cpython-07c71365244ce496042566d94bdd469f7d3b1bf6.tar.gz cpython-07c71365244ce496042566d94bdd469f7d3b1bf6.tar.bz2 |
Issue #16772: in int(x, base), non-integer bases must have an __index__ method.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/longobject.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index 1a82b1c6..bec0a78 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -4283,11 +4283,6 @@ long_new(PyTypeObject *type, PyObject *args, PyObject *kwds) } if (obase == NULL) return PyNumber_Long(x); - if (!PyLong_Check(obase)) { - PyErr_SetString(PyExc_TypeError, - "int() base must be an integer."); - return NULL; - } base = PyNumber_AsSsize_t(obase, NULL); if (base == -1 && PyErr_Occurred()) |