Skip to content

Commit 416cbce

Browse files
alvassinMariatta
authored andcommitted
Fixed typo with asynccontextmanager code example (GH-8845)
`yield conn`, instead of just `yield`.
1 parent 09efe49 commit 416cbce

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)