]> granicus.if.org Git - python/commitdiff
Change "for" explanation slightly based on comment passed along by
authorFred Drake <fdrake@acm.org>
Mon, 30 Nov 1998 20:37:24 +0000 (20:37 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 30 Nov 1998 20:37:24 +0000 (20:37 +0000)
Blake Winton <BlakeW@pcdocs.com>.

Doc/tut/tut.tex

index 2d758aea7c285a507ce0d6c45a48cb1208f260fb..7171c6fa6c8264c68e5b18e5dc6bb05a0a412df9 100644 (file)
@@ -878,13 +878,16 @@ if', and is useful to avoid excessive indentation.  An
 
 \section{\keyword{for} Statements \label{for}}
 
-The \keyword{for} statement in Python differs a bit from what you may be
-used to in \C{} or Pascal.  Rather than always iterating over an
-arithmetic progression of numbers (like in Pascal), or leaving the user
-completely free in the iteration test and step (as \C{}), Python's
-\keyword{for} statement iterates over the items of any sequence (e.g., a
-list or a string), in the order that they appear in the sequence.  For 
-example (no pun intended):
+The \keyword{for}\stindex{for} statement in Python differs a bit from
+what you may be used to in \C{} or Pascal.  Rather than always
+iterating over an arithmetic progression of numbers (like in Pascal),
+or giving the user the ability to define both the iteration step and
+halting condition (as \C{}), Python's \keyword{for}\stindex{for}
+statement iterates over the items of any sequence (e.g., a list or a
+string), in the order that they appear in the sequence.  For example
+(no pun intended):
+% One suggestion was to give a real C example here, but that may only
+% serve to confuse non-C programmers.
 
 \begin{verbatim}
 >>> # Measure some strings: