This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cjw296
Recipients cjw296
Date 2020-02-25.18:42:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582656134.57.0.362705493242.issue39753@roundup.psfhosted.org>
In-reply-to
Content
$ 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'
History
Date User Action Args
2020-02-25 18:42:14cjw296setrecipients: + cjw296
2020-02-25 18:42:14cjw296setmessageid: <1582656134.57.0.362705493242.issue39753@roundup.psfhosted.org>
2020-02-25 18:42:14cjw296linkissue39753 messages
2020-02-25 18:42:14cjw296create