From: kj <28750310+Fidget-Spinner@users.noreply.github.com> Date: Thu, 5 Nov 2020 16:16:27 +0000 (+0800) Subject: [docs] fix wrongly named AsyncContextDecorator (GH-23164) X-Git-Tag: v3.10.0a3~261 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=133aa2d5816b69d8ee755e1a9d2d1977b9205736;p=thirdparty%2FPython%2Fcpython.git [docs] fix wrongly named AsyncContextDecorator (GH-23164) Also added versionchanged. --- diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst index ee2becb8dff2..d5a1068a734f 100644 --- a/Doc/library/contextlib.rst +++ b/Doc/library/contextlib.rst @@ -409,11 +409,11 @@ Functions and classes provided: .. versionadded:: 3.2 -.. class:: AsyncContextManager +.. class:: AsyncContextDecorator - Similar as ContextManger only for async + Similar to :class:`ContextDecorator` but only for asynchronous functions. - Example of ``ContextDecorator``:: + Example of ``AsyncContextDecorator``:: from asyncio import run from contextlib import AsyncContextDecorator @@ -445,6 +445,8 @@ Functions and classes provided: The bit in the middle Finishing + .. versionadded:: 3.10 + .. class:: ExitStack()