Skip to content

Commit 38768e4

Browse files
authored
gh-114384: Align sys.set_asyncgen_hooks signature in docs to reflect implementation (#114385)
1 parent 96c15b1 commit 38768e4

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
@@ -1655,7 +1655,7 @@ always available.
16551655
``'opcode'`` event type added; :attr:`~frame.f_trace_lines` and
16561656
:attr:`~frame.f_trace_opcodes` attributes added to frames
16571657

1658-
.. function:: set_asyncgen_hooks(firstiter, finalizer)
1658+
.. function:: set_asyncgen_hooks([firstiter] [, finalizer])
16591659

16601660
Accepts two optional keyword arguments which are callables that accept an
16611661
: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
@@ -1420,7 +1420,7 @@ sys_set_asyncgen_hooks(PyObject *self, PyObject *args, PyObject *kw)
14201420
}
14211421

14221422
PyDoc_STRVAR(set_asyncgen_hooks_doc,
1423-
"set_asyncgen_hooks(* [, firstiter] [, finalizer])\n\
1423+
"set_asyncgen_hooks([firstiter] [, finalizer])\n\
14241424
\n\
14251425
Set a finalizer for async generators objects."
14261426
);

0 commit comments

Comments
 (0)