from test.test_support import verify, verbose, TestFailed, sortdict
from UserList import UserList
+def e(a, b):
+ print a, b
+
def f(*a, **k):
print a, sortdict(k)
f(1, 2, 3, *(4, 5), **{'a':6, 'b':7})
f(1, 2, 3, x=4, y=5, *(6, 7), **{'a':8, 'b':9})
+# Verify clearing of SF bug #733667
+try:
+ e(c=3)
+except TypeError:
+ pass
+else:
+ print "should raise TypeError: e() got an unexpected keyword argument 'c'"
+
try:
g()
except TypeError, err:
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;