From e045f2ba065f5e08bbc2963ee538464566f6e2cf Mon Sep 17 00:00:00 2001 From: Kumar Aditya Date: Tue, 20 Oct 2026 15:36:00 +0530 Subject: [PATCH] gh-157361: Add What's New entry for anext() and aiter() in Python --- Doc/whatsnew/3.16.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Doc/whatsnew/3.16.rst b/Doc/whatsnew/3.16.rst index 09087c2fefda55..565cd7504d7ea9 100644 --- a/Doc/whatsnew/3.16.rst +++ b/Doc/whatsnew/3.16.rst @@ -100,6 +100,13 @@ Other language changes missing the ``self`` parameter. (Contributed by Suren Nihalani in :gh:`152315`.) +* :func:`anext` and :func:`aiter` are now implemented in Python instead + of C. The awaitable returned by ``anext(it, default)`` and the + ``__anext__()`` of the iterator returned by ``aiter(callable, ...)`` are + now plain coroutines, so introspection tools such as + :func:`asyncio.print_call_graph` can see through them into the awaited code. + (Contributed by Kumar Aditya in :gh:`157361`.) + New modules ===========