summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Vasin <hi@alvass.in>2018-08-25 05:38:11 +0300
committerMariatta <Mariatta@users.noreply.github.com>2018-08-24 19:38:11 -0700
commit416cbce22d5d8879986125f07b3e293421bc975d (patch)
treeea8fa35751c20a58c597abae97815e2ed5c32732
parent09efe49c07e2d5f93b415ead757c87e20cc0026f (diff)
downloadcpython-git-416cbce22d5d8879986125f07b3e293421bc975d.tar.gz
Fixed typo with asynccontextmanager code example (GH-8845)
`yield conn`, instead of just `yield`.
-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 793bd63f67..7dc5b2989f 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)