Kevin Mai-Hsuan Chia <ke...@mhchia.com> added the comment:
In the [example](https://docs.python.org/3.8/library/asyncio-sync.html#asyncio.Condition) of the equivalent code to the `async with` statement: ```python cond = asyncio.Condition() # ... later await lock.acquire() try: await cond.wait() finally: lock.release() ``` `lock.acquire()` should be replaced by `cond.acquire()`, and `lock.release()` replaced by `cond.release()`. So the resulting code snippet becomes: ```python cond = asyncio.Condition() # ... later await cond.acquire() try: await cond.wait() finally: cond.release() ``` ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35826> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com