Ideas about how software should behave

Gregory Ewing greg.ewing at canterbury.ac.nz
Thu Nov 9 02:53:01 EST 2017


Chris Angelico wrote:
> I don't understand why you would use "yield from" as a synonym for
> "await". They are not equivalent. Why would you use one in place of
> the other?

As far as I understand, currently the implementations of "yield from"
and "await" are sufficiently similar that they *would* be equivalent
if the compiler didn't go out of its way to prevent you from
mixing them up.

It does that because they're conceptually different things, and
a future version of CPython might implement them differently.

-- 
Greg



More information about the Python-list mailing list