Methods of built-in types now properly check for keyword arguments
(formerly these were silently ignored). The only built-in methods
that take keyword arguments are __call__, __init__ and __new__.
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index 962c1cc..d7a0644 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -2340,6 +2340,14 @@
vereq(capture.getvalue(), '41\n41\n')
capture.close()
+def kwdargs():
+ if verbose: print "Testing keyword arguments to __init__, __call__..."
+ def f(a): return a
+ vereq(f.__call__(a=42), 42)
+ a = []
+ list.__init__(a, sequence=[0, 1, 2])
+ vereq(a, [0, 1, 2])
+
def test_main():
class_docstrings()
lists()
@@ -2389,6 +2397,7 @@
subclasspropagation()
buffer_inherit()
str_of_str_subclass()
+ kwdargs()
if verbose: print "All OK"
if __name__ == "__main__":