summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2019-10-15 11:40:02 (GMT)
committerGitHub <noreply@github.com>2019-10-15 11:40:02 (GMT)
commitf3ef06a7cb347ab7bd3cc2b0b3dcebe4f9ff36f9 (patch)
tree14fd293892933aadf389040db8e2be63cab4abf6 /Lib/inspect.py
parenteb1dda2b56f67f09352c303588c28880c471ae87 (diff)
downloadcpython-f3ef06a7cb347ab7bd3cc2b0b3dcebe4f9ff36f9.zip
cpython-f3ef06a7cb347ab7bd3cc2b0b3dcebe4f9ff36f9.tar.gz
cpython-f3ef06a7cb347ab7bd3cc2b0b3dcebe4f9ff36f9.tar.bz2
bpo-38478: Correctly handle keyword argument with same name as positional-only parameter (GH-16800)
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index c2a1ed4..3ff395c 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -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