Skip to content

Commit 7b795ba

Browse files
committed
fix functools.reduce signature for pure python
1 parent 2fc8841 commit 7b795ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/functools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ def __ge__(self, other):
234234

235235
_initial_missing = object()
236236

237-
def reduce(function, sequence, /, initial=_initial_missing):
237+
def reduce(function, sequence, initial=_initial_missing):
238238
"""
239-
reduce(function, iterable, /[, initial]) -> value
239+
reduce(function, iterable, /, initial=None) -> value
240240
241241
Apply a function of two arguments cumulatively to the items of a sequence
242242
or iterable, from left to right, so as to reduce the iterable to a single

0 commit comments

Comments
 (0)