Thomas Wouters <thomas@xs4all.net>:

Update the grammar to reflect the most recent changes to list
comprehensions.
This commit is contained in:
Fred Drake 2000-08-15 17:54:49 +00:00
parent d066f6d780
commit a1e214a1ed
1 changed files with 2 additions and 1 deletions

View 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]