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