diff Python/ceval.c @ 8651:4ba9b70ca56e legacy-trunk

Marc-Andre Lemburg's patch to support instance methods with other callable objects than regular Pythonm functions as their im_func.
author Guido van Rossum <guido@python.org>
date Wed, 08 Jul 1998 14:58:16 +0000
parents c4df8b6637b6
children 97a1108b0eb2
line wrap: on
line diff
--- a/Python/ceval.c	Wed Jul 08 13:47:12 1998 +0000
+++ b/Python/ceval.c	Wed Jul 08 14:58:16 1998 +0000
@@ -2432,6 +2432,11 @@
 			}
 			arg = newarg;
 		}
+		if (!PyFunction_Check(func)) {
+			result = PyEval_CallObjectWithKeywords(func, arg, kw);
+			Py_DECREF(arg);
+			return result;
+		}
 	}
 	else {
 		if (!PyFunction_Check(func)) {