Skip to content

some error messages in argument unpacking are different from CPython #1161

Open
@slozier

Description

@slozier

The following function calls both raise a SyntaxError:

def f(**kwargs): pass

f(**{'x': 3}, **{'x': 5}, y=2)
f(x=5, **{'x': 3}, **{'x': 2})

with the error message:

TypeError: function got multiple values for keyword argument 'x'

However, with CPython 3.6 both should have the following error message:

TypeError: f() got multiple values for keyword argument 'x'

Note: The difference is minor, but I'm reporting it because the exact wording of the error messages is checked in test_unpack_ex.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions