Yury Selivanov <yseliva...@gmail.com> added the comment:

There's no inconsistency here and the docs are correct.

If you have a function:

  async def foo():
    pass

Then "foo()" call returns a "coroutine", which is an awaitable.  So

  async def __aenter__():
    ...

always returns an awaitable (regardless if there's a return statement or not).


> On the other hand, actual CPython implementation won't do that; it won't 
> await the returned objects.

If always does await the returned object.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue30831>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to