summaryrefslogtreecommitdiffstats
path: root/Doc/library/contextlib.rst
diff options
context:
space:
mode:
authorAlexander Vasin <hi@alvass.in>2018-08-25 02:38:11 (GMT)
committerMariatta <Mariatta@users.noreply.github.com>2018-08-25 02:38:11 (GMT)
commit416cbce22d5d8879986125f07b3e293421bc975d (patch)
treeea8fa35751c20a58c597abae97815e2ed5c32732 /Doc/library/contextlib.rst
parent09efe49c07e2d5f93b415ead757c87e20cc0026f (diff)
downloadcpython-416cbce22d5d8879986125f07b3e293421bc975d.zip
cpython-416cbce22d5d8879986125f07b3e293421bc975d.tar.gz
cpython-416cbce22d5d8879986125f07b3e293421bc975d.tar.bz2
Fixed typo with asynccontextmanager code example (GH-8845)
`yield conn`, instead of just `yield`.
Diffstat (limited to 'Doc/library/contextlib.rst')
-rw-r--r--Doc/library/contextlib.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst
index 793bd63..7dc5b29 100644
--- a/Doc/library/contextlib.rst
+++ b/Doc/library/contextlib.rst
@@ -116,7 +116,7 @@ Functions and classes provided:
async def get_connection():
conn = await acquire_db_connection()
try:
- yield
+ yield conn
finally:
await release_db_connection(conn)