[Python-checkins] cpython (2.7): Close issue #16077: fix code example in documentation of reduce() built-in

chris.jerdonek python-checkins at python.org
Sat Sep 29 20:51:58 CEST 2012


http://hg.python.org/cpython/rev/a6779524962c
changeset:   79265:a6779524962c
branch:      2.7
user:        Chris Jerdonek <chris.jerdonek at gmail.com>
date:        Sat Sep 29 11:51:37 2012 -0700
summary:
  Close issue #16077: fix code example in documentation of reduce() built-in (from docs@).

files:
  Doc/library/functions.rst |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1100,7 +1100,7 @@
               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
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list