mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
Make it possible to call instancemethod() with 2 arguments.
This commit is contained in:
parent
a7132189d2
commit
2fb9fdc96a
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue