mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
bpo-32452: clarify term 'brackets' in generator tutorial (#5079)
Updates documentation for generator expressions in classes tutorial: Clarify usage of ambiguous term "brackets" by replacing with "square brackets". Updated subsequent lines to respect line breaks. (#5079)
This commit is contained in:
parent
7cc42c356b
commit
f190eb59e6
1 changed files with 3 additions and 3 deletions
|
@ -876,9 +876,9 @@ Generator Expressions
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
Some simple generators can be coded succinctly as expressions using a syntax
|
Some simple generators can be coded succinctly as expressions using a syntax
|
||||||
similar to list comprehensions but with parentheses instead of brackets. These
|
similar to list comprehensions but with parentheses instead of square brackets.
|
||||||
expressions are designed for situations where the generator is used right away
|
These expressions are designed for situations where the generator is used right
|
||||||
by an enclosing function. Generator expressions are more compact but less
|
away by an enclosing function. Generator expressions are more compact but less
|
||||||
versatile than full generator definitions and tend to be more memory friendly
|
versatile than full generator definitions and tend to be more memory friendly
|
||||||
than equivalent list comprehensions.
|
than equivalent list comprehensions.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue