From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 2 May 2022 16:37:10 +0000 (-0700) Subject: gh-92082: contextlib docs: Change aclosing from a class to a function for consistency... X-Git-Tag: v3.10.5~112 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0e9927b6b008ff7537600cec4f91169a006d0c9d;p=thirdparty%2FPython%2Fcpython.git gh-92082: contextlib docs: Change aclosing from a class to a function for consistency (GH-92155) Signed-off-by: prwatson (cherry picked from commit 958f21c5cdb3bbbd16fec87164785cff3dacce96) Co-authored-by: Thaddeus1499 <104600742+Thaddeus1499@users.noreply.github.com> --- diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst index 0fe3206540e8..7c0b83140796 100644 --- a/Doc/library/contextlib.rst +++ b/Doc/library/contextlib.rst @@ -181,7 +181,7 @@ Functions and classes provided: ``page.close()`` will be called when the :keyword:`with` block is exited. -.. class:: aclosing(thing) +.. function:: aclosing(thing) Return an async context manager that calls the ``aclose()`` method of *thing* upon completion of the block. This is basically equivalent to::