From 54524ab669a566623336c36994e1b3f2a6711c77 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 28 Jun 2026 15:01:36 -0400 Subject: [PATCH] Docs: link to language reference instead of PEP (#152462) --- Doc/library/itertools.rst | 12 ++++++------ Doc/reference/expressions.rst | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 65442021ce17..e1730608887b 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -197,9 +197,9 @@ loops that truncate the stream. for iterable in iterables: yield from iterable - Note that :pep:`798` unpacking syntax provides similar functionality - so that ``list(chain(p, q))`` could be written as - ``[*s for s in (p, q)]``. + Note that :ref:`unpacking in comprehensions ` + provides similar functionality so that ``list(chain(p, q))`` could be + written as ``[*s for s in (p, q)]``. .. classmethod:: chain.from_iterable(iterable) @@ -212,9 +212,9 @@ loops that truncate the stream. for iterable in iterables: yield from iterable - Note that :pep:`798` unpacking syntax provides similar functionality - so that ``list(chain.from_iterable(iterables))`` could be written as - ``[*s for s in iterables]``. + Note that :ref:`unpacking in comprehensions ` + provides similar functionality so that ``list(chain.from_iterable(iterables))`` + could be written as ``[*s for s in iterables]``. .. function:: combinations(iterable, r) diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index fe38e06cd1dc..af313f42f9bf 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -848,6 +848,8 @@ appear directly in a class definition. ``yield`` and ``yield from`` prohibited in the implicitly nested scope. +.. _unpacking-comprehensions: + Unpacking in comprehensions ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- 2.47.3