Skip to content

Commit 1f9621c

Browse files
Fixed typo with asynccontextmanager code example (GH-8845)
`yield conn`, instead of just `yield`. (cherry picked from commit 416cbce) Co-authored-by: Alexander Vasin <[email protected]>
1 parent 7b0ed43 commit 1f9621c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/library/contextlib.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Functions and classes provided:
116116
async def get_connection():
117117
conn = await acquire_db_connection()
118118
try:
119-
yield
119+
yield conn
120120
finally:
121121
await release_db_connection(conn)
122122

0 commit comments

Comments
 (0)