Skip to content

Commit 4016be7

Browse files
alvassinmiss-islington
authored andcommitted
Fixed typo with asynccontextmanager code example (pythonGH-8845)
`yield conn`, instead of just `yield`. (cherry picked from commit 416cbce) Co-authored-by: Alexander Vasin <hi@alvass.in>
1 parent 7b0ed43 commit 4016be7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)