https://github.com/python/cpython/commit/38768e4cdd1c4b6e03702da8a94e1c22479d6ed3 commit: 38768e4cdd1c4b6e03702da8a94e1c22479d6ed3 branch: main author: Nikita Sobolev <m...@sobolevn.me> committer: erlend-aasland <erlend.aasl...@protonmail.com> date: 2024-01-21T13:49:49+01:00 summary:
gh-114384: Align sys.set_asyncgen_hooks signature in docs to reflect implementation (#114385) files: M Doc/library/sys.rst M Python/sysmodule.c diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index c371663934314a..abf2c393a44928 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -1655,7 +1655,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 c2de4ecdc8ce0f..f558a00a6916eb 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -1420,7 +1420,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 -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com