Close issue #16077: fix code example in documentation of reduce() built-in (from docs@).

This commit is contained in:
Chris Jerdonek 2012-09-29 11:51:37 -07:00
parent 3e09b14026
commit fab57ccd13
1 changed files with 1 additions and 1 deletions

View File

@ -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