mirror of
https://github.com/python/cpython
synced 2024-10-09 05:29:53 +00:00
074c3e62d1
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.
30 lines
706 B
Plaintext
30 lines
706 B
Plaintext
test_extcall
|
|
() {}
|
|
(1,) {}
|
|
(1, 2) {}
|
|
(1, 2, 3) {}
|
|
(1, 2, 3, 4, 5) {}
|
|
(1, 2, 3, 4, 5) {}
|
|
(1, 2, 3, 4, 5) {}
|
|
(1, 2, 3) {'b': 5, 'a': 4}
|
|
(1, 2, 3, 4, 5) {'b': 7, 'a': 6}
|
|
(1, 2, 3, 6, 7) {'y': 5, 'b': 9, 'x': 4, 'a': 8}
|
|
TypeError: not enough arguments; expected 1, got 0
|
|
TypeError: not enough arguments; expected 1, got 0
|
|
TypeError: not enough arguments; expected 1, got 0
|
|
1 () {}
|
|
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
|
|
unexpected keyword argument: e
|
|
* argument must be a sequence
|
|
** argument must be a dictionary
|
|
3 512 1
|