[New-bugs-announce] [issue27286] str object got multiple values for keyword argument

Martin Panter report at bugs.python.org
Fri Jun 10 05:37:11 EDT 2016


New submission from Martin Panter:

Playing with the generalized unpacking (PEP 448), I found a funny error message, when duplicate dictionary unpackings are included and also duplicate a literal keyword argument:

>>> print(end=".\n", **dict(end="dupe"))  # No problem
TypeError: print() got multiple values for keyword argument 'end'
>>> print(**dict(end=".\n"), **dict(end="dupe"))  # No problem
TypeError: print() got multiple values for keyword argument 'end'
>>> print(end=".\n", **dict(end="dupe"), **dict(end="dupe 2"))  # str object?!
TypeError: str object got multiple values for keyword argument 'end'

----------
components: Interpreter Core
messages: 268110
nosy: martin.panter
priority: normal
severity: normal
status: open
title: str object got multiple values for keyword argument
type: behavior
versions: Python 3.5, Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27286>
_______________________________________


More information about the New-bugs-announce mailing list