[Python-checkins] Fixed typo with asynccontextmanager code example (GH-8845)
Mariatta
webhook-mailer at python.org
Fri Aug 24 22:38:15 EDT 2018
https://github.com/python/cpython/commit/416cbce22d5d8879986125f07b3e293421bc975d
commit: 416cbce22d5d8879986125f07b3e293421bc975d
branch: master
author: Alexander Vasin <hi at alvass.in>
committer: Mariatta <Mariatta at users.noreply.github.com>
date: 2018-08-24T19:38:11-07:00
summary:
Fixed typo with asynccontextmanager code example (GH-8845)
`yield conn`, instead of just `yield`.
files:
M Doc/library/contextlib.rst
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst
index 793bd63f673f..7dc5b2989f9c 100644
--- a/Doc/library/contextlib.rst
+++ b/Doc/library/contextlib.rst
@@ -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)
More information about the Python-checkins
mailing list