From 07c71365244ce496042566d94bdd469f7d3b1bf6 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Sun, 27 Jan 2013 10:17:52 +0000 Subject: Issue #16772: in int(x, base), non-integer bases must have an __index__ method. --- Objects/longobject.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'Objects/longobject.c') diff --git a/Objects/longobject.c b/Objects/longobject.c index 1a82b1c67a..bec0a78008 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()) -- cgit v1.2.1