New submission from Kevin Mai-Hsuan Chia <ke...@mhchia.com>:
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() ``` ---------- assignee: docs@python components: Documentation messages: 334349 nosy: docs@python, mhchia priority: normal severity: normal status: open title: Typo in example for async with statement with condition type: enhancement versions: Python 3.8 _______________________________________ 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