]> granicus.if.org Git - python/commitdiff
Close issue #16077: fix code example in documentation of reduce() built-in (from...
authorChris Jerdonek <chris.jerdonek@gmail.com>
Sat, 29 Sep 2012 18:51:37 +0000 (11:51 -0700)
committerChris Jerdonek <chris.jerdonek@gmail.com>
Sat, 29 Sep 2012 18:51:37 +0000 (11:51 -0700)
Doc/library/functions.rst

index a1f7534b43b4c5b4b7cdf95e42a78f9706759383..25d09d1a8175094a6e1294dea414bc6a5ce4dbc7 100644 (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