Skip to content

Commit 0408148

Browse files
Merge branch 'main' into document-missing-types
2 parents 9eb029b + 35528fc commit 0408148

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+2190
-337
lines changed

Apple/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def lib_non_platform_files(dirname, names):
507507
def create_xcframework(platform: str) -> str:
508508
"""Build an XCframework from the component parts for the platform.
509509
510-
:return: The version number of the Python verion that was packaged.
510+
:return: The version number of the Python version that was packaged.
511511
"""
512512
package_path = CROSS_BUILD_DIR / platform
513513
try:

Doc/c-api/iterator.rst

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ sentinel value is returned.
5252
*sentinel*, the iteration will be terminated.
5353
5454
55-
.. _range-objects:
56-
5755
Range Objects
5856
^^^^^^^^^^^^^
5957
@@ -68,10 +66,8 @@ Range Objects
6866
This function always succeeds.
6967
7068
71-
.. _other-builtin-iterator-types:
72-
73-
Other Builtin Iterator Types
74-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
69+
Builtin Iterator Types
70+
^^^^^^^^^^^^^^^^^^^^^^
7571
7672
These are built-in iteration types that are included in Python's C API, but
7773
provide no additional functions. They are here for completeness.
@@ -95,3 +91,31 @@ provide no additional functions. They are here for completeness.
9591
9692
The type object for :class:`zip` objects.
9793
94+
95+
Other Iterator Objects
96+
^^^^^^^^^^^^^^^^^^^^^^
97+
98+
.. c:var:: PyTypeObject PyByteArrayIter_Type
99+
.. c:var:: PyTypeObject PyBytesIter_Type
100+
.. c:var:: PyTypeObject PyListIter_Type
101+
.. c:var:: PyTypeObject PyListRevIter_Type
102+
.. c:var:: PyTypeObject PySetIter_Type
103+
.. c:var:: PyTypeObject PyTupleIter_Type
104+
.. c:var:: PyTypeObject PyRangeIter_Type
105+
.. c:var:: PyTypeObject PyLongRangeIter_Type
106+
.. c:var:: PyTypeObject PyDictIterKey_Type
107+
.. c:var:: PyTypeObject PyDictRevIterKey_Type
108+
.. c:var:: PyTypeObject PyDictIterValue_Type
109+
.. c:var:: PyTypeObject PyDictRevIterValue_Type
110+
.. c:var:: PyTypeObject PyDictIterItem_Type
111+
.. c:var:: PyTypeObject PyDictRevIterItem_Type
112+
113+
Type objects for iterators of various built-in objects.
114+
115+
Do not create instances of these directly; prefer calling
116+
:c:func:`PyObject_GetIter` instead.
117+
118+
Note that there is no guarantee that a given built-in type uses a given iterator
119+
type. For example, iterating over :class:`range` will use one of two iterator
120+
types depending on the size of the range. Other types may start using a
121+
similar scheme in the future, without warning.

0 commit comments

Comments
 (0)