A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-October/039652.html below:

[Python-Dev] PEP 289: Generator Expressions

[Python-Dev] PEP 289: Generator Expressions [Python-Dev] PEP 289: Generator ExpressionsPhillip J. Eby pje at telecommunity.com
Mon Oct 27 16:20:26 EST 2003
At 04:13 PM 10/27/03 -0500, Raymond Hettinger wrote:
>There was occasional discussion about the parentheses requirement but
>that was quickly settled also.  One idea that had some merit was to not
>require the outer parentheses for a single expression on the rhs of an
>assignment:
>
>     g = (x**2 for x in range(10))   # maybe the outer parens are not
>needed

FWIW, I think the parentheses add clarity over e.g.

g = x**2 for x in range(10)

As this latter formulation looks to me like g will equal 81 after the 
statement is executed.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4