From 40174c358fc87cd1af79969e60da5d76093768a3 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sat, 31 May 2003 07:04:16 +0000 Subject: SF bug #733667: kwargs handled incorrectly The fast_function() inlining optimization only applies when there are zero keyword arguments. --- Python/ceval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/ceval.c') diff --git a/Python/ceval.c b/Python/ceval.c index 85e9e6b14d..c652b07b2c 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3468,7 +3468,7 @@ fast_function(PyObject *func, PyObject ***pp_stack, int n, int na, int nk) PCALL(PCALL_FUNCTION); PCALL(PCALL_FAST_FUNCTION); - if (argdefs == NULL && co->co_argcount == n && + if (argdefs == NULL && co->co_argcount == n && nk==0 && co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { PyFrameObject *f; PyObject *retval = NULL; -- cgit v1.2.1