yield from () Was: Re: weirdness with list()
Dieter Maurer
dieter at handshake.de
Tue Mar 2 12:33:58 EST 2021
Alan Gauld wrote at 2021-2-28 23:47 +0000:
>yield from ()
"yield from iterator" is similar to "for i in iterator: yield i" (with
special handling when data/exceptions are injected into the generator).
Thus, "yield from ()" does essentially nothing with the side effect
that the containing function is treated as generator function.
--
Dieter
More information about the Python-list
mailing list