mirror of
https://github.com/python/cpython.git
synced 2026-06-28 03:41:13 +00: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:
parent
d3ca26983d
commit
2185b73dff
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue