FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-152397: Add note to itertools.chain.from_iterable docs re PEP 798 by Twix1288 · Pull Request #152455 · python/cpython · GitHub

Repository navigation

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
11 changes: 11 additions & 0 deletions Doc/library/itertools.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,17 @@ loops that truncate the stream.
for iterable in iterables:
yield from iterable

.. note::
In Python 3.15+, the inline unpacking form ``(*it for it in iterables)``
(added by :pep:`798`) provides a more readable alternative for simple
flattening::

# equivalent to chain.from_iterable(iterables)
(*it for it in iterables)

``chain.from_iterable`` remains useful as a first-class callable and
for compatibility with earlier Python versions.


.. function:: combinations(iterable, r)

Expand Down
Loading

Back | FazBrowse Home | New Git URL