https://github.com/python/cpython/commit/afefa4a74cecc505a54094c6a0f129fcdc02060a commit: afefa4a74cecc505a54094c6a0f129fcdc02060a branch: 3.12 author: Miss Islington (bot) <[email protected]> committer: erlend-aasland <[email protected]> date: 2024-01-21T13:22:57Z summary:
[3.12] gh-114384: Align sys.set_asyncgen_hooks signature in docs to reflect implementation (GH-114385) (#114386) (cherry picked from commit 38768e4cdd1c4b6e03702da8a94e1c22479d6ed3) Co-authored-by: Nikita Sobolev <[email protected]> files: M Doc/library/sys.rst M Python/sysmodule.c diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index af0eae668e10d6..62783a417e7583 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -1641,7 +1641,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* diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 14f4447425d025..7874920a169b04 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -1361,7 +1361,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." ); _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
