8000 Misc cleanups and wording improvements for the itertools docs by rhettinger · Pull Request #119626 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Misc cleanups and wording improvements for the itertools docs #119626

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
May 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
.
  • Loading branch information
rhettinger committed May 26, 2024
commit 598c4140dadd2b59a87b6a614634e8f68b046d2f
4 changes: 4 additions & 0 deletions Doc/library/itertools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ loops that truncate the stream.
.. versionchanged:: 3.1
Added *step* argument and allowed non-integer arguments.


.. function:: cycle(iterable)

Make an iterator returning elements from the iterable and saving a copy of each.
Expand Down Expand Up @@ -378,6 +379,7 @@ loops that truncate the stream.
for x in iterable:
yield x


.. function:: filterfalse(predicate, iterable)

Make an iterator that filters elements from iterable returning only those for
Expand Down Expand Up @@ -601,6 +603,7 @@ loops that truncate the stream.
keeping pools of values in memory to generate the products. Accordingly,
it is only useful with finite inputs.


.. function:: repeat(object[, times])

Make an iterator that returns *object* over and over again. Runs indefinitely
Expand All @@ -625,6 +628,7 @@ loops that truncate the stream.
>>> list(map(pow, range(10), repeat(2)))
[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]


.. function:: starmap(function, iterable)

Make an iterator that computes the function using arguments obtained from
Expand Down
0