Commit 03f6ad8b authored by Guido van Rossum's avatar Guido van Rossum

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

parent b2a3891a
...@@ -2197,9 +2197,9 @@ instancemethod_new(PyTypeObject* type, PyObject* args, PyObject *kw) ...@@ -2197,9 +2197,9 @@ instancemethod_new(PyTypeObject* type, PyObject* args, PyObject *kw)
{ {
PyObject *func; PyObject *func;
PyObject *self; PyObject *self;
PyObject *classObj; PyObject *classObj = NULL;
if (!PyArg_UnpackTuple(args, "instancemethod", 3, 3, if (!PyArg_UnpackTuple(args, "instancemethod", 2, 3,
&func, &self, &classObj)) &func, &self, &classObj))
return NULL; return NULL;
if (!PyCallable_Check(func)) { if (!PyCallable_Check(func)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment