]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-114384: Align sys.set_asyncgen_hooks signature in docs to reflect implement...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 21 Jan 2024 13:03:53 +0000 (14:03 +0100)
committerGitHub <noreply@github.com>
Sun, 21 Jan 2024 13:03:53 +0000 (13:03 +0000)
(cherry picked from commit 38768e4cdd1c4b6e03702da8a94e1c22479d6ed3)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Doc/library/sys.rst
Python/sysmodule.c

index 6fbfbde4c77068700ae33479cdc275b29df57ca6..2a1e6fb1a9cf2997d21b536d2c1e9abb98536e9e 100644 (file)
@@ -1606,7 +1606,7 @@ always available.
       ``'opcode'`` event type added; :attr:`~frame.f_trace_lines` and
       :attr:`~frame.f_trace_opcodes` attributes added to frames
 
-.. function:: set_asyncgen_hooks(firstiter, finalizer)
+.. function:: set_asyncgen_hooks([firstiter] [, finalizer])
 
    Accepts two optional keyword arguments which are callables that accept an
    :term:`asynchronous generator iterator` as an argument. The *firstiter*
index d0941e8cfebeb6788d6ece9f79efd821ddaef05a..89f454cdc53fed968022194182e8e0906b26710e 100644 (file)
@@ -1282,7 +1282,7 @@ sys_set_asyncgen_hooks(PyObject *self, PyObject *args, PyObject *kw)
 }
 
 PyDoc_STRVAR(set_asyncgen_hooks_doc,
-"set_asyncgen_hooks(* [, firstiter] [, finalizer])\n\
+"set_asyncgen_hooks([firstiter] [, finalizer])\n\
 \n\
 Set a finalizer for async generators objects."
 );