]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fixed typo with asynccontextmanager code example (GH-8845)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 25 Aug 2018 02:51:10 +0000 (22:51 -0400)
committerGitHub <noreply@github.com>
Sat, 25 Aug 2018 02:51:10 +0000 (22:51 -0400)
`yield conn`, instead of just `yield`.
(cherry picked from commit 416cbce22d5d8879986125f07b3e293421bc975d)

Co-authored-by: Alexander Vasin <hi@alvass.in>
Doc/library/contextlib.rst

index 793bd63f673f6ae3c40eac794da9bd9e4568a0bb..7dc5b2989f9c0c02915e32cc6a6cf25efb9c7da8 100644 (file)
@@ -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)