mirror of https://github.com/python/cpython
add index entries for list comprehensions
This commit is contained in:
parent
0932cb4499
commit
b655939d69
|
@ -147,6 +147,7 @@ pass uncaught.
|
||||||
|
|
||||||
\subsection{List displays\label{lists}}
|
\subsection{List displays\label{lists}}
|
||||||
\indexii{list}{display}
|
\indexii{list}{display}
|
||||||
|
\indexii{list}{comprehensions}
|
||||||
|
|
||||||
A list display is a possibly empty series of expressions enclosed in
|
A list display is a possibly empty series of expressions enclosed in
|
||||||
square brackets:
|
square brackets:
|
||||||
|
@ -161,6 +162,7 @@ list_if: "if" test [list_iter]
|
||||||
|
|
||||||
A list display yields a new list object. Its contents are specified
|
A list display yields a new list object. Its contents are specified
|
||||||
by providing either a list of expressions or a list comprehension.
|
by providing either a list of expressions or a list comprehension.
|
||||||
|
\indexii{list}{comprehensions}
|
||||||
When a comma-separated list of expressions is supplied, its elements are
|
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
|
evaluated from left to right and placed into the list object in that
|
||||||
order. When a list comprehension is supplied, it consists of a
|
order. When a list comprehension is supplied, it consists of a
|
||||||
|
|
Loading…
Reference in New Issue