8000 Merge branch 'main' into tvobject · python/cpython@80ffbf3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 80ffbf3

Browse files
Merge branch 'main' into tvobject
2 parents 71cef78 + 42f54d1 commit 80ffbf3

File tree

385 files changed

+9986
-5743
lines changed

Some content is hidden

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

385 files changed

+9986
-5743
lines changed

Doc/c-api/bytearray.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Byte Array Objects
66
------------------
77

8-
.. index:: object: bytearray
8+
.. index:: pair: object; bytearray
99

1010

1111
.. c:type:: PyByteArrayObject

Doc/c-api/bytes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Bytes Objects
88
These functions raise :exc:`TypeError` when expecting a bytes parameter and
99
called with a non-bytes parameter.
1010

11-
.. index:: object: bytes
11+
.. index:: pair: object; bytes
1212

1313

1414
.. c:type:: PyBytesObject

Doc/c-api/capsule.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
< 10000 button class="Button Button--iconOnly Button--invisible ExpandableHunkHeaderDiffLine-module__expand-button-line--rnQN5 ExpandableHunkHeaderDiffLine-module__expand-button-unified--j86KQ" aria-label="Expand file up from line 5" data-direction="up" aria-hidden="true" tabindex="-1">
@@ -5,7 +5,7 @@
55
Capsules
66
--------
77

8-
.. index:: object: Capsule
8+
.. index:: pair: object; Capsule
99

1010
Refer to :ref:`using-capsules` for more information on using these objects.
1111

Doc/c-api/complex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Complex Number Objects
66
----------------------
77

8-
.. index:: object: complex number
8+
.. index:: pair: object; complex number
99

1010
Python's complex number objects are implemented as two distinct types when
1111
viewed from the C API: one is the Python object exposed to Python programs, and

Doc/c-api/concrete.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ This section describes Python type objects and the singleton object ``None``.
4040
Numeric Objects
4141
===============
4242

43-
.. index:: object: numeric
43+
.. index:: pair: object; numeric
4444

4545
.. toctree::
4646

@@ -55,7 +55,7 @@ Numeric Objects
5555
Sequence Objects
5656
================
5757

58-
.. index:: object: sequence
58+
.. index:: pair: object; sequence
5959

6060
Generic operations on sequence objects were discussed in the previous chapter;
6161
this section deals with the specific kinds of sequence objects that are
@@ -77,7 +77,7 @@ intrinsic to the Python language.
7777
Container Objects
7878
=================
7979

80-
.. index:: object: mapping
80+
.. index:: pair: object; mapping
8181

8282
.. toctree::
8383

Doc/c-api/dict.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Dictionary Objects
66
------------------
77

8-
.. index:: object: dictionary
8+
.. index:: pair: object; dictionary
99

1010

1111
.. c:type:: PyDictObject
@@ -154,7 +154,7 @@ Dictionary Objects
154154
155155
.. c:function:: Py_ssize_t PyDict_Size(PyObject *p)
156156
157-
.. index:: builtin: len
157+
.. index:: pair: built-in function; len
158158
159159
Return the number of items in the dictionary. This is equivalent to
160160
``len(p)`` on a dictionary.

Doc/c-api/exceptions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ Signal Handling
602602
.. c:function:: int PyErr_CheckSignals()
603603
604604
.. index::
605-
module: signal
605+
pair: module; signal
606606
single: SIGINT
607607
single: KeyboardInterrupt (built-in exception)
608608
@@ -633,7 +633,7 @@ Signal Handling
633633
.. c:function:: void PyErr_SetInterrupt()
634634
635635
.. index::
636-
module: signal
636+
pair: module; signal
637637
single: SIGINT
638638
single: KeyboardInterrupt (built-in exception)
639639
@@ -648,7 +648,7 @@ Signal Handling
648648
.. c:function:: int PyErr_SetInterruptEx(int signum)
649649
650650
.. index::
651-
module: signal
651+
pair: module; signal
652652
single: KeyboardInterrupt (built-in exception)
653653
654654
Simulate the effect of a signal arriving. The next time

Doc/c-api/file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
File Objects
66
------------
77

8-
.. index:: object: file
8+
.. index:: pair: object; file
99

1010
These APIs are a minimal emulation of the Python 2 C API for built-in file
1111
objects, which used to rely on the buffered I/O (:c:expr:`FILE*`) support

Doc/c-api/float.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Floating Point Objects
66
----------------------
77

8-
.. index:: object: floating point
8+
.. index:: pair: object; floating point
99

1010

1111
.. c:type:: PyFloatObject

Doc/c-api/function.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Function Objects
66
----------------
77

8-
.. index:: object: function
8+
.. index:: pair: object; function
99

1010
There are a few functions specific to Python functions.
1111

Doc/c-api/import.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Importing Modules
4141
4242
.. c:function:: PyObject* PyImport_ImportModuleEx(const char *name, PyObject *globals, PyObject *locals, PyObject *fromlist)
4343
44-
.. index:: builtin: __import__
44+
.. index:: pair: built-in function; __import__
4545
4646
Import a module. This is best described by referring to the built-in Python
4747
function :func:`__import__`.
@@ -120,7 +120,7 @@ Importing Modules
120120
121121
.. c:function:: PyObject* PyImport_ExecCodeModule(const char *name, PyObject *co)
122122
123-
.. index:: builtin: compile
123+
.. index:: pair: built-in function; compile
124124
125125
Given a module name (possibly of the form ``package.module``) and a code object
126126
read from a Python bytecode file or obtained from the built-in function
@@ -186,10 +186,10 @@ Importing Modules
186186
187187
.. versionadded:: 3.2
188188
.. versionchanged:: 3.3
189-
Uses :func:`imp.source_from_cache()` in calculating the source path if
189+
Uses :func:`!imp.source_from_cache()` in calculating the source path if
190190
only the bytecode path is provided.
191191
.. versionchanged:: 3.12
192-
No longer uses the removed ``imp`` module.
192+
No longer uses the removed :mod:`!imp` module.
193193
194194
195195
.. c:function:: long PyImport_GetMagicNumber()

Doc/c-api/init.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,9 @@ Initializing and finalizing the interpreter
336336
single: PyEval_InitThreads()
337337
single: modules (in module sys)
338338
single: path (in module sys)
339-
module: builtins
340-
module: __main__
341-
module: sys
339+
pair: module; builtins
340+
pair: module; __main__
341+
pair: module; sys
342342
triple: module; search; path
343343
single: PySys_SetArgv()
344344
single: PySys_SetArgvEx()
@@ -1051,7 +1051,7 @@ code, or when embedding the Python interpreter:
10511051
10521052
.. deprecated:: 3.9
10531053
1054-
.. index:: module: _thread
1054+
.. index:: pair: module; _thread
10551055
10561056
10571057
.. c:function:: int PyEval_ThreadsInitialized()
@@ -1494,9 +1494,9 @@ function. You can create and destroy them using the following functions:
14941494
.. c:function:: PyThreadState* Py_NewInterpreter()
14951495
14961496
.. index::
1497-
module: builtins
1498-
module: __main__
1499-
module: sys
1497+
pair: module; builtins
1498+
pair: module; __main__
1499+
pair: module; sys
15001500
single: stdout (in module sys)
15011501
single: stderr (in module sys)
15021502
single: stdin (in module sys)

Doc/c-api/intro.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ complete listing.
261261
Objects, Types and Reference Counts
262262
===================================
263263

264-
.. index:: object: type
264+
.. index:: pair: object; type
265265

266266
Most Python/C API functions have one or more arguments as well as a return value
267267
of type :c:expr:`PyObject*`. This type is a pointer to an opaque data type
@@ -705,9 +705,9 @@ interpreter can only be used after the interpreter has been initialized.
705705

706706
.. index::
707707
single: Py_Initialize()
708-
module: builtins
709-
module: __main__
710-
module: sys
708+
pair: module; builtins
709+
pair: module; __main__
710+
pair: module; sys
711711
triple: module; search; path
712712
single: path (in module sys)
713713

Doc/c-api/list.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
List Objects
66
------------
77

8-
.. index:: object: list
8+
.. index:: pair: object; list
99

1010

1111
.. c:type:: PyListObject
@@ -45,7 +45,7 @@ List Objects
4545
4646
.. c:function:: Py_ssize_t PyList_Size(PyObject *list)
4747
48-
.. index:: builtin: len
48+
.. index:: pair: built-in function; len
4949
5050
Return the length of the list object in *list*; this is equivalent to
5151
``len(list)`` on a list object.
@@ -138,7 +138,7 @@ List Objects
138138
139139
.. c:function:: PyObject* PyList_AsTuple(PyObject *list)
140140
141-
.. index:: builtin: tuple
141+
.. index:: pair: built-in function; tuple
142142
143143
Return a new tuple object containing the contents of *list*; equivalent to
144144
``tuple(list)``.

Doc/c-api/long.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
Integer Objects
66
---------------
77

8-
.. index:: object: long integer
9-
object: integer
8+
.. index:: pair: object; long integer
9+
pair: object; integer
1010

1111
All integers are implemented as "long" integer objects of arbitrary size.
1212

Doc/c-api/mapping.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and
2020
.. c:function:: Py_ssize_t PyMapping_Size(PyObject *o)
2121
Py_ssize_t PyMapping_Length(PyObject *o)
2222
23-
.. index:: builtin: len
23+
.. index:: pair: built-in function; len
2424
2525
Returns the number of keys in object *o* on success, and ``-1`` on failure.
2626
This is equivalent to the Python expression ``len(o)``.

Doc/c-api/memoryview.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.. _memoryview-objects:
44

55
.. index::
6-
object: memoryview
6+
pair: object; memoryview
77

88
MemoryView objects
99
------------------

Doc/c-api/method.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Instance Method Objects
66
-----------------------
77

8-
.. index:: object: instancemethod
8+
.. index:: pair: object; instancemethod
99

1010
An instance method is a wrapper for a :c:data:`PyCFunction` and the new way
1111
to bind a :c:data:`PyCFunction` to a class object. It replaces the former call
@@ -47,7 +47,7 @@ to bind a :c:data:`PyCFunction` to a class object. It replaces the former call
4747
Method Objects
4848
--------------
4949
50-
.. index:: object: method
50+
.. index:: pair: object; method
5151
5252
Methods are bound function objects. Methods are always bound to an instance of
5353
a user-defined class. Unbound methods (methods bound to a class object) are

Doc/c-api/module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Module Objects
66
--------------
77

8-
.. index:: object: module
8+
.. index:: pair: object; module
99

1010

1111
.. c:var:: PyTypeObject PyModule_Type

Doc/c-api/none.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
The ``None`` Object
66
-------------------
77

8-
.. index:: object: None
8+
.. index:: pair: object; None
99

1010
Note that the :c:type:`PyTypeObject` for ``None`` is not directly exposed in the
1111
Python/C API. Since ``None`` is a singleton, testing for object identity (using

Doc/c-api/number.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ Number Protocol
6464
6565
.. c:function:: PyObject* PyNumber_Divmod(PyObject *o1, PyObject *o2)
6666
67-
.. index:: builtin: divmod
67+
.. index:: pair: built-in function; divmod
6868
6969
See the built-in function :func:`divmod`. Returns ``NULL`` on failure. This is
7070
the equivalent of the Python expression ``divmod(o1, o2)``.
7171
7272
7373
.. c:function:: PyObject* PyNumber_Power(PyObject *o1, PyObject *o2, PyObject *o3)
7474
75-
.. index:: builtin: pow
75+
.. index:: pair: built-in function; pow
7676
7777
See the built-in function :func:`pow`. Returns ``NULL`` on failure. This is the
7878
equivalent of the Python expression ``pow(o1, o2, o3)``, where *o3* is optional.
@@ -94,7 +94,7 @@ Number Protocol
9494
9595
.. c:function:: PyObject* PyNumber_Absolute(PyObject *o)
9696
97-
.. index:: builtin: abs
97+
.. index:: pair: built-in function; abs
9898
9999
Returns the absolute value of *o*, or ``NULL`` on failure. This is the equivalent
100100
of the Python expression ``abs(o)``.
@@ -192,7 +192,7 @@ Number Protocol
192192
193193
.. c:function:: PyObject* PyNumber_InPlacePower(PyObject *o1, PyObject *o2, PyObject *o3)
194194
195-
.. index:: builtin: pow
195+
.. index:: pair: built-in function; pow
196196
197197
See the built-in function :func:`pow`. Returns ``NULL`` on failure. The operation
198198
is done *in-place* when *o1* supports it. This is the equivalent of the Python
@@ -238,15 +238,15 @@ Number Protocol
238238
239239
.. c:function:: PyObject* PyNumber_Long(PyObject *o)
240240
241-
.. index:: builtin: int
241+
.. index:: pair: built-in function; int
242242
243243
Returns the *o* converted to an integer object on success, or ``NULL`` on
244244
failure. This is the equivalent of the Python expression ``int(o)``.
245245
246246
247247
.. c:function:: PyObject* PyNumber_Float(PyObject *o)
248248
249-
.. index:: builtin: float
249+
.. index:: pair: built-in function; float
250250
251251
Returns the *o* converted to a float object on success, or ``NULL`` on failure.
252252
This is the equivalent of the Python expression ``float(o)``.

0 commit comments

Comments
 (0)
0