[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

`async def` breaks encapsulation?

On 4/03/20 12:52 pm, Marco Sulla wrote:
> Why can't an asynchronous coroutine be simply a coroutine that has an
> `async` or an `await` in its code, without `async` in the signature?

That wouldn't help as much as you seem to think. You still need
to use 'await' whenever you call a coroutine, so switching a
function between coroutine and non-coroutine would still have
just as much of a ripple effect on the rest of your code.