Two fixes for extended call syntax:

If a non-tuple sequence is passed as the *arg, convert it to a tuple
before checking its length.
If named keyword arguments are used in combination with **kwargs, make
a copy of kwargs before inserting the new keys.
This commit is contained in:
Jeremy Hylton 2000-03-30 23:55:31 +00:00
parent aaf0ab26ed
commit 074c3e62d1
3 changed files with 69 additions and 12 deletions

View file

@ -16,6 +16,10 @@ TypeError: not enough arguments; expected 1, got 0
1 (2,) {}
1 (2, 3) {}
1 (2, 3, 4, 5) {}
0 (1, 2) {}
1 () {'d': 4, 'b': 2, 'c': 3, 'a': 1}
{'b': 2, 'c': 3, 'a': 1}
{'b': 2, 'c': 3, 'a': 1}
keyword parameter redefined: x
keyword parameter redefined: b
keywords must be strings