From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 2 Jan 2018 15:42:12 +0000 (-0800) Subject: bpo-32452: clarify term 'brackets' in generator tutorial (GH-5079) (#5082) X-Git-Tag: v2.7.15rc1~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e0d1017a4c8ad6f77ee42d7b640463058037f62;p=thirdparty%2FPython%2Fcpython.git 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 f190eb59e60e2ae7a7cbd396458389a7a076e0d3) --- diff --git a/Doc/tutorial/classes.rst b/Doc/tutorial/classes.rst index 216dcae6b60e..7f45c7632d5a 100644 --- a/Doc/tutorial/classes.rst +++ b/Doc/tutorial/classes.rst @@ -873,9 +873,9 @@ Generator Expressions ===================== Some simple generators can be coded succinctly as expressions using a syntax -similar to list comprehensions but with parentheses instead of brackets. These -expressions are designed for situations where the generator is used right away -by an enclosing function. Generator expressions are more compact but less +similar to list comprehensions but with parentheses instead of square brackets. +These expressions are designed for situations where the generator is used right +away by an enclosing function. Generator expressions are more compact but less versatile than full generator definitions and tend to be more memory friendly than equivalent list comprehensions.