I may be misunderstanding it, but the examples shown don't seem to be illustrative? It seems reasonably obvious that the prints will happen in this order in any language, because in example 1 we are explicitly (a)waiting for the child to finish, and in example 2 both of the parent prints are above the await. So I don't feel like either of these makes the point the author is trying to get across?
mikkelam|3 months ago
I suppose the author meant to say that if you first called your async function and then later did `await` you would have different behavior.
misiek08|3 months ago
In short: having other coroutine working and awaiting e.g. on sleep() you can get anything between „parent before” and „child start”. In Python is impossible, because child is not run as new task.