Skip to content
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

Implement PEP570 #143

Merged
merged 6 commits into from
May 19, 2019
Merged

Implement PEP570 #143

merged 6 commits into from
May 19, 2019

Conversation

isidentical
Copy link
Contributor

Fixes #142

Copy link
Owner

@berkerpeksag berkerpeksag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add tests for invalid examples as well?

def test(p1, p2=None, /, p_or_kw, *, kw):
    pass

def test(p1=None, p2, /, p_or_kw=None, *, kw):
    pass

def test(p1=None, p2, /):
    pass

Also, please follow the existing style in the file and use single-quotes in the visit_arguments method.

@isidentical
Copy link
Contributor Author

@berkerpeksag done, can you review again?

Copy link
Owner

@berkerpeksag berkerpeksag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I decided to the keep code generator tests on the AST level and reverted tests that were raising SyntaxError.

@berkerpeksag berkerpeksag merged commit b958be1 into berkerpeksag:master May 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PEP570 - Positional Only Arguments
2 participants