Skip to content

Commit 0e0d101

Browse files
miss-islingtonbitdancer
authored andcommitted
bpo-32452: clarify term 'brackets' in generator tutorial (GH-5079) (#5082)
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. (GH-5079) (cherry picked from commit f190eb5)
1 parent b495377 commit 0e0d101

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/tutorial/classes.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -873,9 +873,9 @@ Generator Expressions
873873
=====================
874874

875875
Some simple generators can be coded succinctly as expressions using a syntax
876-
similar to list comprehensions but with parentheses instead of brackets. These
877-
expressions are designed for situations where the generator is used right away
878-
by an enclosing function. Generator expressions are more compact but less
876+
similar to list comprehensions but with parentheses instead of square brackets.
877+
These expressions are designed for situations where the generator is used right
878+
away by an enclosing function. Generator expressions are more compact but less
879879
versatile than full generator definitions and tend to be more memory friendly
880880
than equivalent list comprehensions.
881881

0 commit comments

Comments
 (0)