Marc-Andre Lemburg's patch to support instance methods with other

callable objects than regular Pythonm functions as their im_func.
This commit is contained in:
Guido van Rossum 1998-07-08 14:58:16 +00:00
parent bb71ab68f9
commit 7859f87fdb
3 changed files with 41 additions and 19 deletions

View file

@ -2432,6 +2432,11 @@ call_function(func, arg, kw)
}
arg = newarg;
}
if (!PyFunction_Check(func)) {
result = PyEval_CallObjectWithKeywords(func, arg, kw);
Py_DECREF(arg);
return result;
}
}
else {
if (!PyFunction_Check(func)) {