From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 8 Apr 2026 17:56:10 +0000 (+0200) Subject: [3.13] Minor edit: Four space indent in example (gh-148264) (gh-148266) X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4002c3a4615f2d41cf081595cb0d4e3774957ad6;p=thirdparty%2FPython%2Fcpython.git [3.13] Minor edit: Four space indent in example (gh-148264) (gh-148266) --- diff --git a/Doc/library/itertools.rst b/Doc/library/itertools.rst index 8c352c939e9e..47c5326d137c 100644 --- a/Doc/library/itertools.rst +++ b/Doc/library/itertools.rst @@ -855,7 +855,7 @@ and :term:`generators ` which incur interpreter overhead. def running_mean(iterable): "Yield the average of all values seen so far." - # running_mean([8.5, 9.5, 7.5, 6.5]) -> 8.5 9.0 8.5 8.0 + # running_mean([8.5, 9.5, 7.5, 6.5]) → 8.5 9.0 8.5 8.0 return map(truediv, accumulate(iterable), count(1)) def repeatfunc(function, times=None, *args): @@ -934,10 +934,10 @@ and :term:`generators ` which incur interpreter overhead. yield element def unique(iterable, key=None, reverse=False): - "Yield unique elements in sorted order. Supports unhashable inputs." - # unique([[1, 2], [3, 4], [1, 2]]) → [1, 2] [3, 4] - sequenced = sorted(iterable, key=key, reverse=reverse) - return unique_justseen(sequenced, key=key) + "Yield unique elements in sorted order. Supports unhashable inputs." + # unique([[1, 2], [3, 4], [1, 2]]) → [1, 2] [3, 4] + sequenced = sorted(iterable, key=key, reverse=reverse) + return unique_justseen(sequenced, key=key) def sliding_window(iterable, n): "Collect data into overlapping fixed-length chunks or blocks."