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

Support for PEP 570--Positional-only Parameters #93

Closed
berchn opened this issue Nov 16, 2020 · 1 comment
Closed

Support for PEP 570--Positional-only Parameters #93

berchn opened this issue Nov 16, 2020 · 1 comment

Comments

@berchn
Copy link
Contributor

berchn commented Nov 16, 2020

The parser appears to generate an error on function definitions with positional-only parameters:

def name(p1, p2=None, /, p_or_kw=None, *, kw):
  pass
module [0, 0] - [2, 0])
  function_definition [0, 0] - [1, 6])
    name: identifier [0, 4] - [0, 8])
    parameters: parameters [0, 8] - [0, 45])
      identifier [0, 9] - [0, 11])
      default_parameter [0, 13] - [0, 20])
        name: identifier [0, 13] - [0, 15])
        value: none [0, 16] - [0, 20])
      ERROR [0, 22] - [0, 24])
      default_parameter [0, 25] - [0, 37])
        name: identifier [0, 25] - [0, 32])
        value: none [0, 33] - [0, 37])
      list_splat_pattern [0, 39] - [0, 40])
      identifier [0, 42] - [0, 44])
    body: block [1, 2] - [1, 6])
      pass_statement [1, 2] - [1, 6])
@somebody1234
Copy link

same issue as #78

@berchn berchn closed this as completed Nov 30, 2020
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

No branches or pull requests

2 participants