File tree 5 files changed +27
-0
lines changed 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.
12
12
Return non-zero if the object *o * supports the iterator protocol, and ``0 ``
13
13
otherwise. This function always succeeds.
14
14
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
15
21
16
22
.. c :function :: PyObject* PyIter_Next (PyObject *o)
17
23
Original file line number Diff line number Diff line change @@ -356,3 +356,14 @@ Object Protocol
356
356
iterator for the object argument, or the object itself if the object is already
357
357
an iterator. Raises :exc: `TypeError ` and returns ``NULL `` if the object cannot be
358
358
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*:::
1073
1073
PyIter_Check:int:::
1074
1074
PyIter_Check:PyObject*:o:0:
1075
1075
1076
+ PyAiter_Check:int:::
1077
+ PyAiter_Check:PyObject*:o:0:
1078
+
1076
1079
PyIter_Next:PyObject*::+1:
1077
1080
PyIter_Next:PyObject*:o:0:
1078
1081
@@ -1679,6 +1682,9 @@ PyObject_GetItem:PyObject*:key:0:
1679
1682
PyObject_GetIter:PyObject*::+1:
1680
1683
PyObject_GetIter:PyObject*:o:0:
1681
1684
1685
+ PyObject_GetAiter:PyObject*::+1:
1686
+ PyObject_GetAiter:PyObject*:o:0:
1687
+
1682
1688
PyObject_HasAttr:int:::
1683
1689
PyObject_HasAttr:PyObject*:o:0:
1684
1690
PyObject_HasAttr:PyObject*:attr_name:0:
Original file line number Diff line number Diff line change 1
1
# File generated by 'make regen-limited-abi'
2
2
# This is NOT an authoritative list of stable ABI symbols
3
+ PyAiter_Check
3
4
PyArg_Parse
4
5
PyArg_ParseTuple
5
6
PyArg_ParseTupleAndKeywords
@@ -465,6 +466,7 @@ PyObject_GenericGetAttr
465
466
PyObject_GenericGetDict
466
467
PyObject_GenericSetAttr
467
468
PyObject_GenericSetDict
469
+ PyObject_GetAiter
468
470
PyObject_GetAttr
469
471
PyObject_GetAttrString
470
472
PyObject_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.
71
71
72
72
Note: Unlike :func: `iter `, :func: `aiter ` has no 2-argument variant.
73
73
74
+ .. versionadded :: 3.10
74
75
75
76
.. function :: all(iterable)
76
77
@@ -97,6 +98,7 @@ are always available. They are listed here in alphabetical order.
97
98
iterator. If *default * is given, it is returned if the iterator is exhausted,
98
99
otherwise :exc: `StopAsyncIteration ` is raised.
99
100
101
+ .. versionadded :: 3.10
100
102
101
103
.. function :: any(iterable)
102
104
You can’t perform that action at this time.
0 commit comments