]> granicus.if.org Git - python/commitdiff
Fixed typo with asynccontextmanager code example (GH-8845)
authorAlexander Vasin <hi@alvass.in>
Sat, 25 Aug 2018 02:38:11 +0000 (05:38 +0300)
committerMariatta <Mariatta@users.noreply.github.com>
Sat, 25 Aug 2018 02:38:11 +0000 (19:38 -0700)
`yield conn`, instead of just `yield`.

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)