Skip to content

Commit afefa4a

Browse files
[3.12] gh-114384: Align sys.set_asyncgen_hooks signature in docs to reflect implementation (GH-114385) (#114386)
(cherry picked from commit 38768e4) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent 24fa45b commit afefa4a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Doc/library/sys.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1641,7 +1641,7 @@ always available.
16411641
``'opcode'`` event type added; :attr:`~frame.f_trace_lines` and
16421642
:attr:`~frame.f_trace_opcodes` attributes added to frames
16431643

1644-
.. function:: set_asyncgen_hooks(firstiter, finalizer)
1644+
.. function:: set_asyncgen_hooks([firstiter] [, finalizer])
16451645

16461646
Accepts two optional keyword arguments which are callables that accept an
16471647
:term:`asynchronous generator iterator` as an argument. The *firstiter*

Python/sysmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,7 @@ sys_set_asyncgen_hooks(PyObject *self, PyObject *args, PyObject *kw)
13611361
}
13621362

13631363
PyDoc_STRVAR(set_asyncgen_hooks_doc,
1364-
"set_asyncgen_hooks(* [, firstiter] [, finalizer])\n\
1364+
"set_asyncgen_hooks([firstiter] [, finalizer])\n\
13651365
\n\
13661366
Set a finalizer for async generators objects."
13671367
);

0 commit comments

Comments
 (0)