Article 71MX1 [$] Unpacking for Python comprehensions

[$] Unpacking for Python comprehensions

by
jake
from LWN.net on (#71MX1)
Unpacking Python iterables of various sorts, such as dictionaries or lists,is useful in a number of contexts, including for function arguments, butthere has long been a call for extending that capability to comprehensions. PEP798 ("Unpacking inComprehensions") was first proposed in June 2025 to fill that gap. In earlyNovember, the steering council acceptedthe PEP, which means that the feature will be coming to Python3.15 inOctober2026. It may be something of a niche feature, but it is aninconsistency that has been apparent for a while-to the point that some Python programmersassume that it is already present in the language.
External Content
Source RSS or Atom Feed
Feed Location http://lwn.net/headlines/rss
Feed Title LWN.net
Feed Link https://lwn.net/
Reply 0 comments