https://stackoverflow.com/a/44273861/433570
says ‘yield from’ is old and we should learn ‘await’.
But It doesn’t say they are the same thing or they are different.
But I have some good book and videos which talks about yield from
Can I think yield from was replaced by await? and they are essentially the same thing?
https://www.youtube.com/watch?v=MCs5OvhV9S4
I have a book fluent python which also talks about yield from
- Edit
When I see some good books/videos like the above talking about yield from, could I substitute yield from with await in my mind?
>Solution :
Yes they are the same thing. Yield is the manual way of doing async await. See https://www.python.org/dev/peps/pep-0492/#new-coroutine-declaration-syntax where they detail that async await is just a coroutine (yield) underneath