mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Close issue #16077: fix code example in documentation of reduce() built-in (from docs@).
This commit is contained in:
parent
3e09b14026
commit
fab57ccd13
1 changed files with 1 additions and 1 deletions
|
@ -1100,7 +1100,7 @@ available. They are listed here in alphabetical order.
|
|||
except StopIteration:
|
||||
raise TypeError('reduce() of empty sequence with no initial value')
|
||||
accum_value = initializer
|
||||
for x in iterable:
|
||||
for x in it:
|
||||
accum_value = function(accum_value, x)
|
||||
return accum_value
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue