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/2011-November/114398.html below:

3.000] [issue11682] PEP 380 reference implementation for 3.3

[Python-Dev] [SPAM: 3.000] [issue11682] PEP 380 reference implementation for 3.3 [Python-Dev] [SPAM: 3.000] [issue11682] PEP 380 reference implementation for 3.3Greg Ewing greg.ewing at canterbury.ac.nz
Wed Nov 9 11:59:09 CET 2011
Nick Coghlan wrote:
> 
> In reviewing Zbyszek's doc updates and comparing them against the Grammar, I
> discovered a gratuitous change in the implementation: it allows a bare (i.e. no
> parentheses) 'yield from' as an argument to a function.
> 
> I'll add a new test to ensure "yield from x" requires parentheses whenever
> "yield x" requires them (and fix the Grammar file on the implementation branch
> accordingly).

Wait a minute, there's nothing in the PEP as accepted that
mentions any such restriction.

My intention was that it should be as easy as possible to
replace any function call 'f(x)' with 'yield from f(x)'.
If parentheses are required, then instead of

    f(yield from g(x))

we would have to write

    f((yield from g(x)))

I can't see how this is an improvement in readability or
clarity.

-- 
Greg
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