]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
In the description of enumerate(), the indexing operators should not
authorFred Drake <fdrake@acm.org>
Wed, 16 Jul 2003 03:26:31 +0000 (03:26 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 16 Jul 2003 03:26:31 +0000 (03:26 +0000)
be included in the \var.  This produced weird results in general, but
broke the GNU info conversion.

Doc/whatsnew/whatsnew23.tex

index 8b3fc61d7f8e583839e3343fc4f094243db9b40d..fcaa563dd6454ec4ab60d8585fddfccd29cdde59 100644 (file)
@@ -383,8 +383,8 @@ and implemented by Jack Jansen.}
 A new built-in function, \function{enumerate()}, will make
 certain loops a bit clearer.  \code{enumerate(thing)}, where
 \var{thing} is either an iterator or a sequence, returns a iterator
-that will return \code{(0, \var{thing[0]})}, \code{(1,
-\var{thing[1]})}, \code{(2, \var{thing[2]})}, and so forth.  
+that will return \code{(0, \var{thing}[0])}, \code{(1,
+\var{thing}[1])}, \code{(2, \var{thing}[2])}, and so forth.  
 
 Fairly often you'll see code to change every element of a list that
 looks like this: