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

Special cases in iterable unpacking #2585

scoder opened this Issue Aug 28, 2018 · 0 comments


None yet
1 participant

scoder commented Aug 28, 2018

These came up in CPython issue 34508. We should make sure that we support them as well, and follow whatever they decide over there.

    def f(): return *(1, 2), 3

    eval('*(1, 2), 3')

    a = []; a += *(1, 2), 3

    for i in *(1, 2), 3: pass

    def g(): yield *(1, 2), 3
  1. write tests and find out if they work or not, see the extended_unpacking tests.
  2. find the places in the parser ( where these are disallowed, see the hacker guide
  3. fix the parsing issues, find out what else is not working for whatever reason.

Don't hesitate to submit an incomplete PR and ask for further guidance.

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