Skip to content

Commit d2cfb5b

Browse files
[3.11] gh-114384: Align sys.set_asyncgen_hooks signature in docs to reflect implementation (GH-114385) (#114387)
(cherry picked from commit 38768e4) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
1 parent d2551cf commit d2cfb5b

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
@@ -1606,7 +1606,7 @@ always available.
16061606
``'opcode'`` event type added; :attr:`~frame.f_trace_lines` and
16071607
:attr:`~frame.f_trace_opcodes` attributes added to frames
16081608

1609-
.. function:: set_asyncgen_hooks(firstiter, finalizer)
1609+
.. function:: set_asyncgen_hooks([firstiter] [, finalizer])
16101610

16111611
Accepts two optional keyword arguments which are callables that accept an
16121612
: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
@@ -1282,7 +1282,7 @@ sys_set_asyncgen_hooks(PyObject *self, PyObject *args, PyObject *kw)
12821282
}
12831283

12841284
PyDoc_STRVAR(set_asyncgen_hooks_doc,
1285-
"set_asyncgen_hooks(* [, firstiter] [, finalizer])\n\
1285+
"set_asyncgen_hooks([firstiter] [, finalizer])\n\
12861286
\n\
12871287
Set a finalizer for async generators objects."
12881288
);

0 commit comments

Comments
 (0)