mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
bpo-38478: Correctly handle keyword argument with same name as positional-only parameter (GH-16800)
This commit is contained in:
parent
eb1dda2b56
commit
f3ef06a7cb
3 changed files with 14 additions and 1 deletions
|
@ -2960,7 +2960,7 @@ class Signature:
|
|||
arguments[param.name] = tuple(values)
|
||||
break
|
||||
|
||||
if param.name in kwargs:
|
||||
if param.name in kwargs and param.kind != _POSITIONAL_ONLY:
|
||||
raise TypeError(
|
||||
'multiple values for argument {arg!r}'.format(
|
||||
arg=param.name)) from None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue