Message362656
$ python
Python 3.8.1 (v3.8.1:1b293b6006, Dec 18 2019, 14:08:53)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from functools import partial
>>> def foo(x, y, z, a=None): pass
...
>>> p = partial(foo, 1, y=2)
>>> from inspect import signature
>>> signature(p).parameters.values()
odict_values([<Parameter "y=2">, <Parameter "z">, <Parameter "a=None">])
That <Parameter "y=2"> shouldn't be in there:
>>> p(2, y=3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: foo() got multiple values for argument 'y' |
|
Date |
User |
Action |
Args |
2020-02-25 18:42:14 | cjw296 | set | recipients:
+ cjw296 |
2020-02-25 18:42:14 | cjw296 | set | messageid: <1582656134.57.0.362705493242.issue39753@roundup.psfhosted.org> |
2020-02-25 18:42:14 | cjw296 | link | issue39753 messages |
2020-02-25 18:42:14 | cjw296 | create | |
|