mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-37645: add new function _PyObject_FunctionStr() (GH-14890)
Additional note: the `method_check_args` function in `Objects/descrobject.c` is written in such a way that it applies to all kinds of descriptors. In particular, a future re-implementation of `wrapper_descriptor` could use that code. CC @vstinner @encukou https://bugs.python.org/issue37645 Automerge-Triggered-By: @encukou
This commit is contained in:
parent
b3966639d2
commit
bf17d41826
11 changed files with 171 additions and 94 deletions
|
@ -236,27 +236,27 @@ Overridden parameters
|
|||
>>> f(x=5, **{'x': 3}, y=2)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
TypeError: f() got multiple values for keyword argument 'x'
|
||||
TypeError: test.test_unpack_ex.f() got multiple values for keyword argument 'x'
|
||||
|
||||
>>> f(**{'x': 3}, x=5, y=2)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
TypeError: f() got multiple values for keyword argument 'x'
|
||||
TypeError: test.test_unpack_ex.f() got multiple values for keyword argument 'x'
|
||||
|
||||
>>> f(**{'x': 3}, **{'x': 5}, y=2)
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
TypeError: f() got multiple values for keyword argument 'x'
|
||||
TypeError: test.test_unpack_ex.f() got multiple values for keyword argument 'x'
|
||||
|
||||
>>> f(x=5, **{'x': 3}, **{'x': 2})
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
TypeError: f() got multiple values for keyword argument 'x'
|
||||
TypeError: test.test_unpack_ex.f() got multiple values for keyword argument 'x'
|
||||
|
||||
>>> f(**{1: 3}, **{1: 5})
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
TypeError: f() got multiple values for keyword argument '1'
|
||||
TypeError: test.test_unpack_ex.f() got multiple values for keyword argument '1'
|
||||
|
||||
Unpacking non-sequence
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue