gh-114384: Align sys.set_asyncgen_hooks signature in docs to reflect implementation (#114385)
This commit is contained in:
parent
96c15b1c8d
commit
38768e4cdd
@ -1655,7 +1655,7 @@ always available.
|
|||||||
``'opcode'`` event type added; :attr:`~frame.f_trace_lines` and
|
``'opcode'`` event type added; :attr:`~frame.f_trace_lines` and
|
||||||
:attr:`~frame.f_trace_opcodes` attributes added to frames
|
: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
|
Accepts two optional keyword arguments which are callables that accept an
|
||||||
:term:`asynchronous generator iterator` as an argument. The *firstiter*
|
:term:`asynchronous generator iterator` as an argument. The *firstiter*
|
||||||
|
@ -1420,7 +1420,7 @@ sys_set_asyncgen_hooks(PyObject *self, PyObject *args, PyObject *kw)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyDoc_STRVAR(set_asyncgen_hooks_doc,
|
PyDoc_STRVAR(set_asyncgen_hooks_doc,
|
||||||
"set_asyncgen_hooks(* [, firstiter] [, finalizer])\n\
|
"set_asyncgen_hooks([firstiter] [, finalizer])\n\
|
||||||
\n\
|
\n\
|
||||||
Set a finalizer for async generators objects."
|
Set a finalizer for async generators objects."
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user