Skip to content

Parse error when passing keyword arguments after forwarding **args #2580

Description

@z33ky
def spam(x, y): pass

def ok(**kwargs) -> None:
    spam(x=1, **kwargs)  # OK

def err(**kwargs) -> None:
    spam(**kwargs, x=1)  # error: Parse error before "x"

I wouldn't think the order matters. The Python interpreter does not have an issue with it.

With --fast-parser I get error: "spam" gets multiple values for keyword argument "x" instead. Should I open a separate issue for this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions