summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-08-15 17:54:49 (GMT)
committerFred Drake <fdrake@acm.org>2000-08-15 17:54:49 (GMT)
commita1e214a1ed23943702e880b18f5c03c9a86b8958 (patch)
treeb738174928151ff7d65ac8366c1b9e437de52cde /Doc
parentd066f6d780139eb990061d9413447289f1817374 (diff)
downloadcpython-a1e214a1ed23943702e880b18f5c03c9a86b8958.zip
cpython-a1e214a1ed23943702e880b18f5c03c9a86b8958.tar.gz
cpython-a1e214a1ed23943702e880b18f5c03c9a86b8958.tar.bz2
Thomas Wouters <thomas@xs4all.net>:
Update the grammar to reflect the most recent changes to list comprehensions.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/ref/ref5.tex3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/ref/ref5.tex b/Doc/ref/ref5.tex
index 6b699bc..5d7a4c6 100644
--- a/Doc/ref/ref5.tex
+++ b/Doc/ref/ref5.tex
@@ -152,7 +152,8 @@ A list display is a possibly empty series of expressions enclosed in
square brackets:
\begin{verbatim}
-list_display: "[" [expression_list [list_iter]] "]"
+list_display: "[" [listmaker] "]"
+listmaker: expression_list ( list_iter | ( "," expression)* [","] )
list_iter: list_for | list_if
list_for: "for" expression_list "in" testlist [list_iter]
list_if: "if" test [list_iter]