mirror of
https://github.com/python/cpython.git
synced 2026-06-28 22:00:19 -04:00
[3.15] Update an error message in the 'Functional Programming HOWTO' (GH-151047)
(cherry picked from commit 81965c1683)
Co-authored-by: saber-bit <bryanventura0324@gmail.com>
This commit is contained in:
committed by
GitHub
parent
d3ca26983d
commit
2185b73dff
@@ -1042,7 +1042,7 @@ first calculation. ::
|
||||
>>> functools.reduce(operator.concat, [])
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
TypeError: reduce() of empty sequence with no initial value
|
||||
TypeError: reduce() of empty iterable with no initial value
|
||||
>>> functools.reduce(operator.mul, [1, 2, 3], 1)
|
||||
6
|
||||
>>> functools.reduce(operator.mul, [], 1)
|
||||
|
||||
Reference in New Issue
Block a user