Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Document the signature and ``default`` argument in the docstring of the new ``anext`` builtin.
7 changes: 5 additions & 2 deletions Python/bltinmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1635,13 +1635,16 @@ anext as builtin_anext
default: object = NULL
/

Return the next item from the async iterator.
async anext(aiterator[, default])

Return the next item from the async iterator. If default is given and the async
iterator is exhausted, it is returned instead of raising StopAsyncIteration.
[clinic start generated code]*/

static PyObject *
builtin_anext_impl(PyObject *module, PyObject *aiterator,
PyObject *default_value)
/*[clinic end generated code: output=f02c060c163a81fa input=699d11f4e38eca24]*/
/*[clinic end generated code: output=f02c060c163a81fa input=8f63f4f78590bb4c]*/
{
PyTypeObject *t;
PyObject *awaitable;
Expand Down
7 changes: 5 additions & 2 deletions Python/clinic/bltinmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.