Skip to content

Commit 778913b

Browse files
authored
Merge branch 'main' into deprecate-consts/141004
2 parents fd0ebd8 + 95f6e12 commit 778913b

File tree

114 files changed

+2655
-554
lines changed

Some content is hidden

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

114 files changed

+2655
-554
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/dict.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,11 @@ Dictionary Objects
245245
``len(p)`` on a dictionary.
246246
247247
248+
.. c:function:: Py_ssize_t PyDict_GET_SIZE(PyObject *p)
249+
250+
Similar to :c:func:`PyDict_Size`, but without error checking.
251+
252+
248253
.. c:function:: int PyDict_Next(PyObject *p, Py_ssize_t *ppos, PyObject **pkey, PyObject **pvalue)
249254
250255
Iterate over all key-value pairs in the dictionary *p*. The

Doc/c-api/float.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,23 @@ Floating-Point Objects
9292
.. deprecated-removed:: 3.15 3.20
9393
9494
95+
.. c:macro:: Py_RETURN_NAN
96+
97+
Return :data:`math.nan` from a function.
98+
99+
On most platforms, this is equivalent to ``return PyFloat_FromDouble(NAN)``.
100+
101+
102+
.. c:macro:: Py_RETURN_INF(sign)
103+
104+
Return :data:`math.inf` or :data:`-math.inf <math.inf>` from a function,
105+
depending on the sign of *sign*.
106+
107+
On most platforms, this is equivalent to the following::
108+
109+
return PyFloat_FromDouble(copysign(INFINITY, sign));
110+
111+
95112
Pack and Unpack functions
96113
-------------------------
97114

Doc/c-api/iterator.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,32 @@ sentinel value is returned.
5050
callable object that can be called with no parameters; each call to it should
5151
return the next item in the iteration. When *callable* returns a value equal to
5252
*sentinel*, the iteration will be terminated.
53+
54+
55+
Other Iterator Objects
56+
^^^^^^^^^^^^^^^^^^^^^^
57+
58+
.. c:var:: PyTypeObject PyByteArrayIter_Type
59+
.. c:var:: PyTypeObject PyBytesIter_Type
60+
.. c:var:: PyTypeObject PyListIter_Type
61+
.. c:var:: PyTypeObject PyListRevIter_Type
62+
.. c:var:: PyTypeObject PySetIter_Type
63+
.. c:var:: PyTypeObject PyTupleIter_Type
64+
.. c:var:: PyTypeObject PyRangeIter_Type
65+
.. c:var:: PyTypeObject PyLongRangeIter_Type
66+
.. c:var:: PyTypeObject PyDictIterKey_Type
67+
.. c:var:: PyTypeObject PyDictRevIterKey_Type
68+
.. c:var:: PyTypeObject PyDictIterValue_Type
69+
.. c:var:: PyTypeObject PyDictRevIterValue_Type
70+
.. c:var:: PyTypeObject PyDictIterItem_Type
71+
.. c:var:: PyTypeObject PyDictRevIterItem_Type
72+
73+
Type objects for iterators of various built-in objects.
74+
75+
Do not create instances of these directly; prefer calling
76+
:c:func:`PyObject_GetIter` instead.
77+
78+
Note that there is no guarantee that a given built-in type uses a given iterator
79+
type. For example, iterating over :class:`range` will use one of two iterator
80+
types depending on the size of the range. Other types may start using a
81+
similar scheme in the future, without warning.

Doc/c-api/memoryview.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ A :class:`memoryview` object exposes the C level :ref:`buffer interface
1313
any other object.
1414

1515

16+
.. c:var:: PyTypeObject PyMemoryView_Type
17+
18+
This instance of :c:type:`PyTypeObject` represents the Python memoryview
19+
type. This is the same object as :class:`memoryview` in the Python layer.
20+
21+
1622
.. c:function:: PyObject *PyMemoryView_FromObject(PyObject *obj)
1723
1824
Create a memoryview object from an object that provides the buffer interface.

0 commit comments

Comments
 (0)