mirror of https://github.com/python/cpython
Make it possible to call instancemethod() with 2 arguments.
This commit is contained in:
parent
a7132189d2
commit
2fb9fdc96a
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue