mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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:
parent
aaf0ab26ed
commit
074c3e62d1
3 changed files with 69 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue