Skip to content
Merged
Changes from all commits
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
6 changes: 3 additions & 3 deletions Doc/library/itertools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -798,10 +798,10 @@ which incur interpreter overhead.
"Return first n items of the iterable as a list"
return list(islice(iterable, n))

def prepend(value, iterator):
"Prepend a single value in front of an iterator"
def prepend(value, iterable):
"Prepend a single value in front of an iterable"
# prepend(1, [2, 3, 4]) --> 1 2 3 4
return chain([value], iterator)
return chain([value], iterable)

def tabulate(function, start=0):
"Return function(0), function(1), ..."
Expand Down