Skip to content

Special cases in iterable unpacking #2585

Open
@scoder

Description

@scoder

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 (Parsing.py) 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions