]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] 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:22:57 +0000 (14:22 +0100)
committerGitHub <noreply@github.com>
Sun, 21 Jan 2024 13:22:57 +0000 (13:22 +0000)
(cherry picked from commit 38768e4cdd1c4b6e03702da8a94e1c22479d6ed3)

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

index af0eae668e10d6052ba36f57103f26a070a5f8df..62783a417e7583adef18c9aceecfaffef58ca905 100644 (file)
@@ -1641,7 +1641,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 14f4447425d025f17ba1ebf466e100cf8add1867..7874920a169b04aaad3fc7cfa26f11bea55beeae 100644 (file)
@@ -1361,7 +1361,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."
 );