Make it possible to call instancemethod() with 2 arguments.

This commit is contained in:
Guido van Rossum 2003-04-09 19:35:08 +00:00
parent a7132189d2
commit 2fb9fdc96a
1 changed files with 2 additions and 2 deletions

View File

@ -2197,9 +2197,9 @@ instancemethod_new(PyTypeObject* type, PyObject* args, PyObject *kw)
{
PyObject *func;
PyObject *self;
PyObject *classObj;
PyObject *classObj = NULL;
if (!PyArg_UnpackTuple(args, "instancemethod", 3, 3,
if (!PyArg_UnpackTuple(args, "instancemethod", 2, 3,
&func, &self, &classObj))
return NULL;
if (!PyCallable_Check(func)) {