Message337433
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. |
|
Date |
User |
Action |
Args |
2019-03-07 20:42:44 | yselivanov | set | recipients:
+ yselivanov, docs@python, dmiyakawa, adelfino |
2019-03-07 20:42:44 | yselivanov | set | messageid: <1551991364.45.0.383274671147.issue30831@roundup.psfhosted.org> |
2019-03-07 20:42:44 | yselivanov | link | issue30831 messages |
2019-03-07 20:42:44 | yselivanov | create | |
|