On Tue, Feb 17, 2004 at 03:36:19AM -0800, rhettinger at users.sourceforge.net wrote: > { > ! PyObject *v; > ! if (!PyArg_ParseTuple(args, "|i:pop", &i)) > return NULL; > --- 773,788 ---- > { > ! PyObject *v, *arg = NULL; > ! > ! if (!PyArg_UnpackTuple(args, "pop", 0, 1, &arg)) > return NULL; > + if (arg != NULL) { > + if (PyInt_Check(arg)) > + i = (int)(PyInt_AS_LONG((PyIntObject*) arg)); > + else { > + PyErr_SetString(PyExc_TypeError, "an integer is required"); > + return NULL; > + } > + } This is a change in behaviour. This used to work: >>> x = [1,2,3] >>> x.pop(1L) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: an integer is required
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4