bpo-43918: document signature and default argument of anext builtin (#25551)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
This commit is contained in:
Erik Welch 2021-06-22 16:00:51 -05:00 committed by GitHub
parent a6b47de07a
commit 6af4e6b266
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 4 deletions

View file

@ -543,7 +543,10 @@ PyDoc_STRVAR(builtin_anext__doc__,
"anext($module, aiterator, default=<unrepresentable>, /)\n"
"--\n"
"\n"
"Return the next item from the async iterator.");
"async anext(aiterator[, default])\n"
"\n"
"Return the next item from the async iterator. If default is given and the async\n"
"iterator is exhausted, it is returned instead of raising StopAsyncIteration.");
#define BUILTIN_ANEXT_METHODDEF \
{"anext", (PyCFunction)(void(*)(void))builtin_anext, METH_FASTCALL, builtin_anext__doc__},
@ -874,4 +877,4 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
exit:
return return_value;
}
/*[clinic end generated code: output=da9ae459e9233259 input=a9049054013a1b77]*/
/*[clinic end generated code: output=e1d8057298b5de61 input=a9049054013a1b77]*/