From: Fred Drake Date: Tue, 15 Aug 2000 17:54:49 +0000 (+0000) Subject: Thomas Wouters : X-Git-Tag: v2.0b1~432 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1e214a1ed23943702e880b18f5c03c9a86b8958;p=python Thomas Wouters : Update the grammar to reflect the most recent changes to list comprehensions. --- diff --git a/Doc/ref/ref5.tex b/Doc/ref/ref5.tex index 6b699bcc08..5d7a4c6aaa 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]