[3.11] gh-114384: Align sys.set_asyncgen_hooks signature in docs to reflect implementation (GH-114385) (#114387)

(cherry picked from commit 38768e4cdd)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
Miss Islington (bot) 2024-01-21 14:03:53 +01:00 committed by GitHub
parent d2551cfc6b
commit d2cfb5b258
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View 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*

View 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."
);