]> granicus.if.org Git - python/commitdiff
Thomas Wouters <thomas@xs4all.net>:
authorFred Drake <fdrake@acm.org>
Tue, 15 Aug 2000 17:54:49 +0000 (17:54 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 15 Aug 2000 17:54:49 +0000 (17:54 +0000)
Update the grammar to reflect the most recent changes to list
comprehensions.

Doc/ref/ref5.tex

index 6b699bcc0802f982377c7a9277c056b7b884304b..5d7a4c6aaa566d1ee44d375524d9bf1f4c1fe4f1 100644 (file)
@@ -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]