diff --git a/Objects/classobject.c b/Objects/classobject.c index 5362fbcd6ff..5500ed51da6 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -141,7 +141,7 @@ method_new(PyTypeObject* type, PyObject* args, PyObject *kw) if (!_PyArg_NoKeywords("instancemethod", kw)) return NULL; - if (!PyArg_UnpackTuple(args, "method", 2, 3, + if (!PyArg_UnpackTuple(args, "method", 2, 2, &func, &self)) return NULL; if (!PyCallable_Check(func)) {