PEP 798: Unpacking in Comprehensions

Hi,

The Python Steering Council has begun deliberating on PEP 798 today, and we expect to decide by next week. We’re still evaluating several aspects of the proposal and gathering additional information.

One point we’d like to raise is the framing of the new syntax. The PEP currently presents unpacking in comprehensions as offering “much clearer” code compared to existing alternatives (such as itertools.chain.from_iterable, explicit loops, or nested comprehensions). We view readability claims like this as inherently subjective: what reads clearly to one programmer may not to another. We would recommend not to position this syntax as “more readable” or suggest people should adopt it for clarity reasons. We believe the stronger, more objective argument is syntactic consistency as extending Python’s existing unpacking patterns naturally into comprehensions.

We’re still considering other aspects of the proposal and will have more information to share next week, but we wanted to update you as soon as possible, as we know waiting with no news can be frustrating.

Thanks for your patience and for the thoughtful work on this PEP.

The Python Steering Council

19 Likes