Skip to content

Additional keyword args in class declaration not supported #573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gvanrossum opened this issue Feb 5, 2015 · 3 comments
Closed

Additional keyword args in class declaration not supported #573

gvanrossum opened this issue Feb 5, 2015 · 3 comments
Labels
bug mypy got something wrong

Comments

@gvanrossum
Copy link
Member

In Python 3 you can have arbitrary keyword args in a class declaration, as follows:

class C(metaclass=MyMeta, extra=42):
    ...

Here, mypy reports a syntax error at the comma.

@JukkaL JukkaL added the bug mypy got something wrong label Feb 6, 2015
@JukkaL
Copy link
Collaborator

JukkaL commented Feb 6, 2015

Ah, I didn't know about that!

@JukkaL JukkaL added the priority label Feb 8, 2015
@JukkaL
Copy link
Collaborator

JukkaL commented Feb 8, 2015

Bumping priority since I want to work towards full Python 3 syntax support.

@JelleZijlstra
Copy link
Member

This is fixed; there are tests in test-data/unit/parse.test that do class Foo(metaclass=Bar, _root=None): pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

3 participants