[issue30831] Inconsistent or wrong documentation around Asynchronous Context Manager

2019-03-07 Thread Yury Selivanov
Yury Selivanov added the comment: I also recommend reading this page https://docs.python.org/3/library/asyncio-task.html to get a better grasp on coroutines and how they are evaluated. -- ___ Python tracker __

[issue30831] Inconsistent or wrong documentation around Asynchronous Context Manager

2019-03-07 Thread Yury Selivanov
Yury Selivanov 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 the

[issue30831] Inconsistent or wrong documentation around Asynchronous Context Manager

2019-03-07 Thread Andrés Delfino
Change by Andrés Delfino : -- nosy: +adelfino, yselivanov versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue30831] Inconsistent or wrong documentation around Asynchronous Context Manager

2017-07-03 Thread Daisuke Miyakawa
New submission from Daisuke Miyakawa: I was reading the following doc and got confused. https://docs.python.org/3.7/reference/datamodel.html#object.__aenter__ According to the API doc itself (and original PEP 492), __aenter__() "is semantically similar to the __enter__(), with only difference