This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yselivanov
Recipients adelfino, dmiyakawa, docs@python, yselivanov
Date 2019-03-07.20:42:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551991364.45.0.383274671147.issue30831@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-03-07 20:42:44yselivanovsetrecipients: + yselivanov, docs@python, dmiyakawa, adelfino
2019-03-07 20:42:44yselivanovsetmessageid: <1551991364.45.0.383274671147.issue30831@roundup.psfhosted.org>
2019-03-07 20:42:44yselivanovlinkissue30831 messages
2019-03-07 20:42:44yselivanovcreate