summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2000-08-23 17:03:34 (GMT)
committerSkip Montanaro <skip@pobox.com>2000-08-23 17:03:34 (GMT)
commit323fe5df6a7f37c29ae536238ddf1740736af6a9 (patch)
treebbd2fb999f86598877787f6ae67d72379189b963
parent297bf7ceb5d325ad300c5b7776856a6c8cce4c93 (diff)
downloadcpython-323fe5df6a7f37c29ae536238ddf1740736af6a9.zip
cpython-323fe5df6a7f37c29ae536238ddf1740736af6a9.tar.gz
cpython-323fe5df6a7f37c29ae536238ddf1740736af6a9.tar.bz2
fix list comprehension discussion to use \keyword macro instead of simply
quoting keywords.
-rw-r--r--Doc/ref/ref5.tex7
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/ref/ref5.tex b/Doc/ref/ref5.tex
index f6d3b9c..55725d1 100644
--- a/Doc/ref/ref5.tex
+++ b/Doc/ref/ref5.tex
@@ -164,10 +164,11 @@ by providing either a list of expressions or a list comprehension.
When a comma-separated list of expressions is supplied, its elements are
evaluated from left to right and placed into the list object in that
order. When a list comprehension is supplied, it consists of a
-single expression followed by at least one "for" clause and zero or more
-"for" or "if" clauses. In this
+single expression followed by at least one \keyword{for} clause and zero or
+more \keyword{for} or \keyword{if} clauses. In this
case, the elements of the new list are those that would be produced
-by considering each of the "for" or "if" clauses a block, nesting from
+by considering each of the \keyword{for} or \keyword{if} clauses a block,
+nesting from
left to right, and evaluating the expression to produce a list element
each time the innermost block is reached.
\obindex{list}