File tree Expand file tree Collapse file tree 5 files changed +27
-0
lines changed Expand file tree Collapse file tree 5 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ There are two functions specifically for working with iterators.
1212 Return non-zero if the object *o * supports the iterator protocol, and ``0 ``
1313 otherwise. This function always succeeds.
1414
15+ .. c :function :: int PyAiter_Check (PyObject *o)
16+
17+ Returns non-zero if the object 'obj' provides :class: `AsyncIterator `
18+ protocols, and ``0 `` otherwise. This function always succeeds.
19+
20+ .. versionadded :: 3.10
1521
1622.. c :function :: PyObject* PyIter_Next (PyObject *o)
1723
Original file line number Diff line number Diff line change @@ -356,3 +356,14 @@ Object Protocol
356356 iterator for the object argument, or the object itself if the object is already
357357 an iterator. Raises :exc: `TypeError ` and returns ``NULL `` if the object cannot be
358358 iterated.
359+
360+
361+ .. c :function :: PyObject* PyObject_GetAiter (PyObject *o)
362+
363+ This is the equivalent to the Python expression ``aiter(o) ``. Takes an
364+ :class: `AsyncIterable ` object and returns an :class: `AsyncIterator ` for it.
365+ This is typically a new iterator but if the argument is an
366+ :class: `AsyncIterator `, this returns itself. Raises :exc: `TypeError ` and
367+ returns ``NULL `` if the object cannot be iterated.
368+
369+ .. versionadded :: 3.10
Original file line number Diff line number Diff line change @@ -1073,6 +1073,9 @@ PyInterpreterState_New:PyInterpreterState*:::
10731073PyIter_Check:int:::
10741074PyIter_Check:PyObject*:o:0:
10751075
1076+ PyAiter_Check:int:::
1077+ PyAiter_Check:PyObject*:o:0:
1078+
10761079PyIter_Next:PyObject*::+1:
10771080PyIter_Next:PyObject*:o:0:
10781081
@@ -1679,6 +1682,9 @@ PyObject_GetItem:PyObject*:key:0:
16791682PyObject_GetIter:PyObject*::+1:
16801683PyObject_GetIter:PyObject*:o:0:
16811684
1685+ PyObject_GetAiter:PyObject*::+1:
1686+ PyObject_GetAiter:PyObject*:o:0:
1687+
16821688PyObject_HasAttr:int:::
16831689PyObject_HasAttr:PyObject*:o:0:
16841690PyObject_HasAttr:PyObject*:attr_name:0:
Original file line number Diff line number Diff line change 11# File generated by 'make regen-limited-abi'
22# This is NOT an authoritative list of stable ABI symbols
3+ PyAiter_Check
34PyArg_Parse
45PyArg_ParseTuple
56PyArg_ParseTupleAndKeywords
@@ -465,6 +466,7 @@ PyObject_GenericGetAttr
465466PyObject_GenericGetDict
466467PyObject_GenericSetAttr
467468PyObject_GenericSetDict
469+ PyObject_GetAiter
468470PyObject_GetAttr
469471PyObject_GetAttrString
470472PyObject_GetItem
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ are always available. They are listed here in alphabetical order.
7171
7272 Note: Unlike :func: `iter `, :func: `aiter ` has no 2-argument variant.
7373
74+ .. versionadded :: 3.10
7475
7576.. function :: all(iterable)
7677
@@ -97,6 +98,7 @@ are always available. They are listed here in alphabetical order.
9798 iterator. If *default * is given, it is returned if the iterator is exhausted,
9899 otherwise :exc: `StopAsyncIteration ` is raised.
99100
101+ .. versionadded :: 3.10
100102
101103.. function :: any(iterable)
102104
You can’t perform that action at this time.
0 commit comments