Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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