SIGN IN SIGN UP

bpo-10544: Deprecate "yield" in comprehensions and generator expressions. (GH-4579)

The current behaviour of yield expressions inside comprehensions  and
generator expressions is essentially an accident of implementation - it
arises implicitly from the way the compiler handles yield expressions inside
nested functions and generators.

Since the current behaviour wasn't deliberately designed, and is inherently
confusing, we're deprecating it, with no current plans to reintroduce it.
Instead, our advice will be to use a named nested generator definition
for cases where this behaviour is desired.
S
Serhiy Storchaka committed
73a7e9b10b2ec9636e3c6396cf7b3695f8ed1856
Parent: 6a89481
Committed by Nick Coghlan <ncoghlan@gmail.com> on 12/1/2017, 4:54:17 AM