◐ Shell
clean mode source ↗

Message 256566 - Python tracker

It should always be valid to create a new coroutine instance. Perhaps you meant:

instance = foo()
print(await instance)  # Okay the first time
print(await instance)  # Second time should be an error

This seems sensible, at least for 3.6. Maybe it should also be an error to re-await if the coroutine raised an exception, and if it was cancelled via close().