Yes, you just forgot return
:
def __await__(self):
# Just do exactly what ten() does
return (yield from self.ten().__await__())
This is the classic way, and return (yield from awaitable.__await__())
is equivalent to return await awaitable
in an asynchronous function.