Ideas about how software should behave (was: replacing `else` with `then` in `for` and `try`)
Chris Angelico
rosuav at gmail.com
Wed Nov 8 11:31:23 EST 2017
On Thu, Nov 9, 2017 at 3:19 AM, Ian Kelly <ian.g.kelly at gmail.com> wrote:
> I was not referring to the possible future use of yield from for async
> generators; I was referring to the possibility *today* of using "yield
> from" as a synonym for *await*. As far as I know the only major
> obstacle to that is that the authors (with good reason) made it a
> SyntaxError. This is exactly the same sort of situation: it's a
> construct that would otherwise be perfectly valid, but it's made a
> SyntaxError specifically to prevent users from doing some the devs
> don't want them to.
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?
ChrisA
More information about the Python-list
mailing list