Skip to content

Commit a84e2db

Browse files
[3.14] Minor edit: Four space indent in example (gh-148264) (gh-148265)
1 parent 5df7652 commit a84e2db

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Doc/library/itertools.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ and :term:`generators <generator>` which incur interpreter overhead.
853853

854854
def running_mean(iterable):
855855
"Yield the average of all values seen so far."
856-
# running_mean([8.5, 9.5, 7.5, 6.5]) -> 8.5 9.0 8.5 8.0
856+
# running_mean([8.5, 9.5, 7.5, 6.5]) 8.5 9.0 8.5 8.0
857857
return map(truediv, accumulate(iterable), count(1))
858858

859859
def repeatfunc(function, times=None, *args):
@@ -935,10 +935,10 @@ and :term:`generators <generator>` which incur interpreter overhead.
935935
yield element
936936

937937
def unique(iterable, key=None, reverse=False):
938-
"Yield unique elements in sorted order. Supports unhashable inputs."
939-
# unique([[1, 2], [3, 4], [1, 2]]) → [1, 2] [3, 4]
940-
sequenced = sorted(iterable, key=key, reverse=reverse)
941-
return unique_justseen(sequenced, key=key)
938+
"Yield unique elements in sorted order. Supports unhashable inputs."
939+
# unique([[1, 2], [3, 4], [1, 2]]) → [1, 2] [3, 4]
940+
sequenced = sorted(iterable, key=key, reverse=reverse)
941+
return unique_justseen(sequenced, key=key)
942942

943943
def sliding_window(iterable, n):
944944
"Collect data into overlapping fixed-length chunks or blocks."

0 commit comments

Comments
 (0)