]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] GH-97950: Use new-style index directive ('builtin') (GH-104164) (#104221)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 6 May 2023 04:14:37 +0000 (21:14 -0700)
committerGitHub <noreply@github.com>
Sat, 6 May 2023 04:14:37 +0000 (07:14 +0300)
GH-97950: Use new-style index directive ('builtin') (GH-104164)

* Uncomment builtin removal in pairindextypes

* Use new-style index directive ('builtin') - C API

* Use new-style index directive ('builtin') - Extending

* Use new-style index directive ('builtin') - Library

* Use new-style index directive ('builtin') - Reference

* Use new-style index directive ('builtin') - Tutorial
(cherry picked from commit f5088006ca8e9654fbc3de119462f0ab764e408b)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
23 files changed:
Doc/c-api/dict.rst
Doc/c-api/import.rst
Doc/c-api/list.rst
Doc/c-api/mapping.rst
Doc/c-api/number.rst
Doc/c-api/object.rst
Doc/c-api/sequence.rst
Doc/c-api/set.rst
Doc/c-api/structures.rst
Doc/c-api/typeobj.rst
Doc/extending/newtypes.rst
Doc/library/dis.rst
Doc/library/functions.rst
Doc/library/pprint.rst
Doc/library/stdtypes.rst
Doc/library/types.rst
Doc/reference/compound_stmts.rst
Doc/reference/datamodel.rst
Doc/reference/simple_stmts.rst
Doc/reference/toplevel_components.rst
Doc/tools/extensions/pyspecific.py
Doc/tutorial/inputoutput.rst
Doc/tutorial/stdlib.rst

index 4bfd1d01590b8ff36e490e59807a586d967d6a4f..17cde77c186ff49147a70e9a2c90bd2a1493f8de 100644 (file)
@@ -154,7 +154,7 @@ Dictionary Objects
 
 .. c:function:: Py_ssize_t PyDict_Size(PyObject *p)
 
-   .. index:: builtin: len
+   .. index:: pair: built-in function; len
 
    Return the number of items in the dictionary.  This is equivalent to
    ``len(p)`` on a dictionary.
index 0922956c607bc3d1819d3d5dfbb3d997a08c07a4..57328fc16198c5237962c92f3c538c2c338a64d3 100644 (file)
@@ -41,7 +41,7 @@ Importing Modules
 
 .. c:function:: PyObject* PyImport_ImportModuleEx(const char *name, PyObject *globals, PyObject *locals, PyObject *fromlist)
 
-   .. index:: builtin: __import__
+   .. index:: pair: built-in function; __import__
 
    Import a module.  This is best described by referring to the built-in Python
    function :func:`__import__`.
@@ -120,7 +120,7 @@ Importing Modules
 
 .. c:function:: PyObject* PyImport_ExecCodeModule(const char *name, PyObject *co)
 
-   .. index:: builtin: compile
+   .. index:: pair: built-in function; compile
 
    Given a module name (possibly of the form ``package.module``) and a code object
    read from a Python bytecode file or obtained from the built-in function
index 317421f0db8453cdac5add50085b6d019cc2d39e..dbf35611eccd3e74ec6e67bb5c36989da90dd6b6 100644 (file)
@@ -45,7 +45,7 @@ List Objects
 
 .. c:function:: Py_ssize_t PyList_Size(PyObject *list)
 
-   .. index:: builtin: len
+   .. index:: pair: built-in function; len
 
    Return the length of the list object in *list*; this is equivalent to
    ``len(list)`` on a list object.
@@ -138,7 +138,7 @@ List Objects
 
 .. c:function:: PyObject* PyList_AsTuple(PyObject *list)
 
-   .. index:: builtin: tuple
+   .. index:: pair: built-in function; tuple
 
    Return a new tuple object containing the contents of *list*; equivalent to
    ``tuple(list)``.
index 3c9d282c6d0ab021297b8ab1ba44b633664474d3..cffb0ed50fb77d3caef5357de8a27b89a252f6d7 100644 (file)
@@ -20,7 +20,7 @@ See also :c:func:`PyObject_GetItem`, :c:func:`PyObject_SetItem` and
 .. c:function:: Py_ssize_t PyMapping_Size(PyObject *o)
                Py_ssize_t PyMapping_Length(PyObject *o)
 
-   .. index:: builtin: len
+   .. index:: pair: built-in function; len
 
    Returns the number of keys in object *o* on success, and ``-1`` on failure.
    This is equivalent to the Python expression ``len(o)``.
index 70b91f8c2d0ca17ad92094e9bcbb97065d57ef8f..13d3c5af956905a5e3dd9c94ed22408a98577431 100644 (file)
@@ -64,7 +64,7 @@ Number Protocol
 
 .. c:function:: PyObject* PyNumber_Divmod(PyObject *o1, PyObject *o2)
 
-   .. index:: builtin: divmod
+   .. index:: pair: built-in function; divmod
 
    See the built-in function :func:`divmod`. Returns ``NULL`` on failure.  This is
    the equivalent of the Python expression ``divmod(o1, o2)``.
@@ -72,7 +72,7 @@ Number Protocol
 
 .. c:function:: PyObject* PyNumber_Power(PyObject *o1, PyObject *o2, PyObject *o3)
 
-   .. index:: builtin: pow
+   .. index:: pair: built-in function; pow
 
    See the built-in function :func:`pow`. Returns ``NULL`` on failure.  This is the
    equivalent of the Python expression ``pow(o1, o2, o3)``, where *o3* is optional.
@@ -94,7 +94,7 @@ Number Protocol
 
 .. c:function:: PyObject* PyNumber_Absolute(PyObject *o)
 
-   .. index:: builtin: abs
+   .. index:: pair: built-in function; abs
 
    Returns the absolute value of *o*, or ``NULL`` on failure.  This is the equivalent
    of the Python expression ``abs(o)``.
@@ -192,7 +192,7 @@ Number Protocol
 
 .. c:function:: PyObject* PyNumber_InPlacePower(PyObject *o1, PyObject *o2, PyObject *o3)
 
-   .. index:: builtin: pow
+   .. index:: pair: built-in function; pow
 
    See the built-in function :func:`pow`. Returns ``NULL`` on failure.  The operation
    is done *in-place* when *o1* supports it.  This is the equivalent of the Python
@@ -238,7 +238,7 @@ Number Protocol
 
 .. c:function:: PyObject* PyNumber_Long(PyObject *o)
 
-   .. index:: builtin: int
+   .. index:: pair: built-in function; int
 
    Returns the *o* converted to an integer object on success, or ``NULL`` on
    failure.  This is the equivalent of the Python expression ``int(o)``.
@@ -246,7 +246,7 @@ Number Protocol
 
 .. c:function:: PyObject* PyNumber_Float(PyObject *o)
 
-   .. index:: builtin: float
+   .. index:: pair: built-in function; float
 
    Returns the *o* converted to a float object on success, or ``NULL`` on failure.
    This is the equivalent of the Python expression ``float(o)``.
index 0a12bb9e8c54f0d1a5a07e2129fc99ab2a64cedc..1a0fe332590dc5b81bde5d2862409c36efd6c351 100644 (file)
@@ -190,7 +190,7 @@ Object Protocol
 
 .. c:function:: PyObject* PyObject_Repr(PyObject *o)
 
-   .. index:: builtin: repr
+   .. index:: pair: built-in function; repr
 
    Compute a string representation of object *o*.  Returns the string
    representation on success, ``NULL`` on failure.  This is the equivalent of the
@@ -202,7 +202,7 @@ Object Protocol
 
 .. c:function:: PyObject* PyObject_ASCII(PyObject *o)
 
-   .. index:: builtin: ascii
+   .. index:: pair: built-in function; ascii
 
    As :c:func:`PyObject_Repr`, compute a string representation of object *o*, but
    escape the non-ASCII characters in the string returned by
@@ -227,7 +227,7 @@ Object Protocol
 
 .. c:function:: PyObject* PyObject_Bytes(PyObject *o)
 
-   .. index:: builtin: bytes
+   .. index:: pair: built-in function; bytes
 
    Compute a bytes representation of object *o*.  ``NULL`` is returned on
    failure and a bytes object on success.  This is equivalent to the Python
@@ -278,7 +278,7 @@ Object Protocol
 
 .. c:function:: Py_hash_t PyObject_Hash(PyObject *o)
 
-   .. index:: builtin: hash
+   .. index:: pair: built-in function; hash
 
    Compute and return the hash value of an object *o*.  On failure, return ``-1``.
    This is the equivalent of the Python expression ``hash(o)``.
@@ -312,7 +312,7 @@ Object Protocol
 
 .. c:function:: PyObject* PyObject_Type(PyObject *o)
 
-   .. index:: builtin: type
+   .. index:: pair: built-in function; type
 
    When *o* is non-``NULL``, returns a type object corresponding to the object type
    of object *o*. On failure, raises :exc:`SystemError` and returns ``NULL``.  This
@@ -332,7 +332,7 @@ Object Protocol
 .. c:function:: Py_ssize_t PyObject_Size(PyObject *o)
                Py_ssize_t PyObject_Length(PyObject *o)
 
-   .. index:: builtin: len
+   .. index:: pair: built-in function; len
 
    Return the length of object *o*.  If the object *o* provides either the sequence
    and mapping protocols, the sequence length is returned.  On error, ``-1`` is
index c78d273f9f149f5c3b012f23b02aed48867a8b61..402a3e5e09ff560e52fbb1f4f1efc28980cc4d3f 100644 (file)
@@ -18,7 +18,7 @@ Sequence Protocol
 .. c:function:: Py_ssize_t PySequence_Size(PyObject *o)
                Py_ssize_t PySequence_Length(PyObject *o)
 
-   .. index:: builtin: len
+   .. index:: pair: built-in function; len
 
    Returns the number of objects in sequence *o* on success, and ``-1`` on
    failure.  This is equivalent to the Python expression ``len(o)``.
@@ -120,7 +120,7 @@ Sequence Protocol
 
 .. c:function:: PyObject* PySequence_Tuple(PyObject *o)
 
-   .. index:: builtin: tuple
+   .. index:: pair: built-in function; tuple
 
    Return a tuple object with the same contents as the sequence or iterable *o*,
    or ``NULL`` on failure.  If *o* is a tuple, a new reference will be returned,
index 8e8af60252250e19e433e8e928af3bce0a3f14f1..d642a5f1902e2ebbd0e61aede149a6f4c4b04b74 100644 (file)
@@ -107,7 +107,7 @@ or :class:`frozenset` or instances of their subtypes.
 
 .. c:function:: Py_ssize_t PySet_Size(PyObject *anyset)
 
-   .. index:: builtin: len
+   .. index:: pair: built-in function; len
 
    Return the length of a :class:`set` or :class:`frozenset` object. Equivalent to
    ``len(anyset)``.  Raises a :exc:`PyExc_SystemError` if *anyset* is not a
index 30760c0db88c4a94ebbc70cd7992b610ab59e0b6..cfd6d20a348990a7946949ccb02b868db2bab58e 100644 (file)
@@ -366,7 +366,7 @@ method.
 
 .. data:: METH_CLASS
 
-   .. index:: builtin: classmethod
+   .. index:: pair: built-in function; classmethod
 
    The method will be passed the type object as the first parameter rather
    than an instance of the type.  This is used to create *class methods*,
@@ -376,7 +376,7 @@ method.
 
 .. data:: METH_STATIC
 
-   .. index:: builtin: staticmethod
+   .. index:: pair: built-in function; staticmethod
 
    The method will be passed ``NULL`` as the first parameter rather than an
    instance of the type.  This is used to create *static methods*, similar to
index aa2de3344778fb24e5e72486f760b749f109841e..ce327166f3ab0ef0ecef2ac2147470d9f5cd9c8e 100644 (file)
@@ -803,7 +803,7 @@ and :c:type:`PyType_Type` effectively act as defaults.)
 
 .. c:member:: reprfunc PyTypeObject.tp_repr
 
-   .. index:: builtin: repr
+   .. index:: pair: built-in function; repr
 
    An optional pointer to a function that implements the built-in function
    :func:`repr`.
@@ -868,7 +868,7 @@ and :c:type:`PyType_Type` effectively act as defaults.)
 
 .. c:member:: hashfunc PyTypeObject.tp_hash
 
-   .. index:: builtin: hash
+   .. index:: pair: built-in function; hash
 
    An optional pointer to a function that implements the built-in function
    :func:`hash`.
index 5ba6383640cc730a416f22239733fbad257288da..e60db11b5f10f4aaa5a4b3ab3ca20213f8f50a67 100644 (file)
@@ -149,7 +149,7 @@ done.  This can be done using the :c:func:`PyErr_Fetch` and
 
 .. index::
    single: string; object representation
-   builtin: repr
+   pair: built-in function; repr
 
 Object Presentation
 -------------------
index 7915be81f1f463dbbcde77e6261bef44cd47ee10..aec095dd7601802345c43604d98d3231ff3420dd 100644 (file)
@@ -1268,7 +1268,7 @@ iterations of the loop.
 
 .. opcode:: BUILD_SLICE (argc)
 
-   .. index:: builtin: slice
+   .. index:: pair: built-in function; slice
 
    Pushes a slice object on the stack.  *argc* must be 2 or 3.  If it is 2,
    ``slice(TOS1, TOS)`` is pushed; if it is 3, ``slice(TOS2, TOS1, TOS)`` is
index 1a7311911ba7a2aff27843c91e3c73048d5b0321..f3dc02f03db0e96e54bb1fb266b1c52bd571f95b 100644 (file)
@@ -561,7 +561,7 @@ are always available.  They are listed here in alphabetical order.
       Raises an :ref:`auditing event <auditing>` ``exec`` with the code object
       as the argument. Code compilation events may also be raised.
 
-.. index:: builtin: exec
+.. index:: pair: built-in function; exec
 
 .. function:: exec(object, globals=None, locals=None, /, *, closure=None)
 
index 3da5aa9389b17df618210a65509b1992f88e87f7..2a3bc92e1733addb4a073b94c5d2be87e306e151 100644 (file)
@@ -159,7 +159,7 @@ The :mod:`pprint` module defines one class:
 
 .. function:: isreadable(object)
 
-   .. index:: builtin: eval
+   .. index:: pair: built-in function; eval
 
    Determine if the formatted representation of *object* is "readable", or can be
    used to reconstruct the value using :func:`eval`.  This always returns ``False``
@@ -214,7 +214,7 @@ created.
 
 .. method:: PrettyPrinter.isreadable(object)
 
-   .. index:: builtin: eval
+   .. index:: pair: built-in function; eval
 
    Determine if the formatted representation of the object is "readable," or can be
    used to reconstruct the value using :func:`eval`.  Note that this returns
index d57581f1d535fd490a98bb0ea919d8939f6df2f7..12f2fe9e2e89a36147c245bbfbb5dfd851c39edd 100644 (file)
@@ -244,9 +244,9 @@ and imaginary parts.
 
 .. index::
    single: arithmetic
-   builtin: int
-   builtin: float
-   builtin: complex
+   pair: built-in function; int
+   pair: built-in function; float
+   pair: built-in function; complex
    single: operator; + (plus)
    single: + (plus); unary operator
    single: + (plus); binary operator
@@ -906,9 +906,9 @@ operations have the same priority as the corresponding numeric operations. [3]_
 
 .. index::
    triple: operations on; sequence; types
-   builtin: len
-   builtin: min
-   builtin: max
+   pair: built-in function; len
+   pair: built-in function; min
+   pair: built-in function; max
    pair: concatenation; operation
    pair: repetition; operation
    pair: subscript; operation
@@ -1074,7 +1074,7 @@ Immutable Sequence Types
 .. index::
    triple: immutable; sequence; types
    pair: object; tuple
-   builtin: hash
+   pair: built-in function; hash
 
 The only operation that immutable sequence types generally implement that is
 not also implemented by mutable sequence types is support for the :func:`hash`
@@ -4372,7 +4372,7 @@ Mapping Types --- :class:`dict`
    triple: operations on; mapping; types
    triple: operations on; dictionary; type
    pair: statement; del
-   builtin: len
+   pair: built-in function; len
 
 A :term:`mapping` object maps :term:`hashable` values to arbitrary objects.
 Mappings are mutable objects.  There is currently only one standard mapping
@@ -5295,7 +5295,7 @@ Code Objects
 ------------
 
 .. index::
-   builtin: compile
+   pair: built-in function; compile
    single: __code__ (function object attribute)
 
 Code objects are used by the implementation to represent "pseudo-compiled"
@@ -5309,8 +5309,8 @@ Accessing ``__code__`` raises an :ref:`auditing event <auditing>`
 ``object.__getattr__`` with arguments ``obj`` and ``"__code__"``.
 
 .. index::
-   builtin: exec
-   builtin: eval
+   pair: built-in function; exec
+   pair: built-in function; eval
 
 A code object can be executed or evaluated by passing it (instead of a source
 string) to the :func:`exec` or :func:`eval`  built-in functions.
@@ -5324,7 +5324,7 @@ Type Objects
 ------------
 
 .. index::
-   builtin: type
+   pair: built-in function; type
    pair: module; types
 
 Type objects represent the various object types.  An object's type is accessed
index 89d30156fc73a1f16416736706b92c84da2009c2..5625140b50b9d5155da3dffed6207b122808d7ea 100644 (file)
@@ -146,7 +146,7 @@ Standard names are defined for the following types:
 
 .. class:: CodeType(**kwargs)
 
-   .. index:: builtin: compile
+   .. index:: pair: built-in function; compile
 
    The type for code objects such as returned by :func:`compile`.
 
index cd448d213487f254083137e9fea42741c0393f42..d6492ac18f9250b098fc20fddeb9229d2055d682 100644 (file)
@@ -188,7 +188,7 @@ those made in the suite of the for-loop::
 
 
 .. index::
-   builtin: range
+   pair: built-in function; range
 
 Names in the target list are not deleted when the loop is finished, but if the
 sequence is empty, they will not have been assigned to at all by the loop.  Hint:
index 73eb402b71660ef277077d9096ece60972006e2e..112d5f8e8a84dfc723d2407cd537550ccce5765e 100644 (file)
@@ -21,8 +21,8 @@ conformance to Von Neumann's model of a "stored program computer", code is also
 represented by objects.)
 
 .. index::
-   builtin: id
-   builtin: type
+   pair: built-in function; id
+   pair: built-in function; type
    single: identity of an object
    single: value of an object
    single: type of an object
@@ -267,7 +267,7 @@ Ellipsis
 
 Sequences
    .. index::
-      builtin: len
+      pair: built-in function; len
       pair: object; sequence
       single: index operation
       single: item selection
@@ -308,8 +308,8 @@ Sequences
 
       Strings
          .. index::
-            builtin: chr
-            builtin: ord
+            pair: built-in function; chr
+            pair: built-in function; ord
             single: character
             single: integer
             single: Unicode
@@ -384,7 +384,7 @@ Sequences
 
 Set types
    .. index::
-      builtin: len
+      pair: built-in function; len
       pair: object; set type
 
    These represent unordered, finite sets of unique, immutable objects. As such,
@@ -418,7 +418,7 @@ Set types
 
 Mappings
    .. index::
-      builtin: len
+      pair: built-in function; len
       single: subscription
       pair: object; mapping
 
@@ -908,7 +908,7 @@ Class instances
 
 I/O objects (also known as file objects)
    .. index::
-      builtin: open
+      pair: built-in function; open
       pair: module; io
       single: popen() (in module os)
       single: makefile() (socket method)
@@ -1176,7 +1176,7 @@ Internal types
          and the ``tb_next`` attribute of existing instances can be updated.
 
    Slice objects
-      .. index:: builtin: slice
+      .. index:: pair: built-in function; slice
 
       Slice objects are used to represent slices for
       :meth:`~object.__getitem__`
@@ -1410,7 +1410,7 @@ Basic customization
 
 .. method:: object.__bytes__(self)
 
-   .. index:: builtin: bytes
+   .. index:: pair: built-in function; bytes
 
    Called by :ref:`bytes <func-bytes>` to compute a byte-string representation
    of an object. This should return a :class:`bytes` object.
@@ -1418,7 +1418,7 @@ Basic customization
    .. index::
       single: string; __format__() (object method)
       pair: string; conversion
-      builtin: print
+      pair: built-in function; print
 
 
 .. method:: object.__format__(self, format_spec)
@@ -1498,7 +1498,7 @@ Basic customization
 
    .. index::
       pair: object; dictionary
-      builtin: hash
+      pair: built-in function; hash
 
    Called by built-in function :func:`hash` and for operations on members of
    hashed collections including :class:`set`, :class:`frozenset`, and
@@ -2049,7 +2049,7 @@ Metaclasses
 
 .. index::
    single: metaclass
-   builtin: type
+   pair: built-in function; type
    single: = (equals); class definition
 
 By default, classes are constructed using :func:`type`. The class body is
@@ -2472,7 +2472,7 @@ through the object's keys; for sequences, it should iterate through the values.
 .. method:: object.__len__(self)
 
    .. index::
-      builtin: len
+      pair: built-in function; len
       single: __bool__() (object method)
 
    Called to implement the built-in function :func:`len`.  Should return the length
@@ -2630,9 +2630,9 @@ left undefined.
             object.__or__(self, other)
 
    .. index::
-      builtin: divmod
-      builtin: pow
-      builtin: pow
+      pair: built-in function; divmod
+      pair: built-in function; pow
+      pair: built-in function; pow
 
    These methods are called to implement the binary arithmetic operations
    (``+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`,
@@ -2665,8 +2665,8 @@ left undefined.
             object.__ror__(self, other)
 
    .. index::
-      builtin: divmod
-      builtin: pow
+      pair: built-in function; divmod
+      pair: built-in function; pow
 
    These methods are called to implement the binary arithmetic operations
    (``+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`,
@@ -2678,7 +2678,7 @@ left undefined.
    ``type(y).__rsub__(y, x)`` is called if ``type(x).__sub__(x, y)`` returns
    *NotImplemented*.
 
-   .. index:: builtin: pow
+   .. index:: pair: built-in function; pow
 
    Note that ternary :func:`pow` will not try calling :meth:`__rpow__` (the
    coercion rules would become too complicated).
@@ -2725,7 +2725,7 @@ left undefined.
             object.__abs__(self)
             object.__invert__(self)
 
-   .. index:: builtin: abs
+   .. index:: pair: built-in function; abs
 
    Called to implement the unary arithmetic operations (``-``, ``+``, :func:`abs`
    and ``~``).
@@ -2736,9 +2736,9 @@ left undefined.
             object.__float__(self)
 
    .. index::
-      builtin: complex
-      builtin: int
-      builtin: float
+      pair: built-in function; complex
+      pair: built-in function; int
+      pair: built-in function; float
 
    Called to implement the built-in functions :func:`complex`,
    :func:`int` and :func:`float`.  Should return a value
@@ -2763,7 +2763,7 @@ left undefined.
             object.__floor__(self)
             object.__ceil__(self)
 
-   .. index:: builtin: round
+   .. index:: pair: built-in function; round
 
    Called to implement the built-in function :func:`round` and :mod:`math`
    functions :func:`~math.trunc`, :func:`~math.floor` and :func:`~math.ceil`.
index ca1aa744389bda8330276bcbea7635f9fcda3b48..f7a8b44d195417839f94082d2fd7fa1c7d0bd893 100644 (file)
@@ -53,7 +53,7 @@ An expression statement evaluates the expression list (which may be a single
 expression).
 
 .. index::
-   builtin: repr
+   pair: built-in function; repr
    pair: object; None
    pair: string; conversion
    single: output
@@ -970,9 +970,9 @@ annotation.
    them or silently change the meaning of the program.
 
 .. index::
-   builtin: exec
-   builtin: eval
-   builtin: compile
+   pair: built-in function; exec
+   pair: built-in function; eval
+   pair: built-in function; compile
 
 **Programmer's note:** :keyword:`global` is a directive to the parser.  It
 applies only to code parsed at the same time as the :keyword:`!global` statement.
index ee472ace6e2129462de0529be08b1493ae4b0976..dd3d3d6878e2892d92cfdd4d18c738de32490076 100644 (file)
@@ -98,7 +98,7 @@ Expression input
 ================
 
 .. index:: single: input
-.. index:: builtin: eval
+.. index:: pair: built-in function; eval
 
 :func:`eval` is used for expression input.  It ignores leading whitespace. The
 string argument to :func:`eval` must have the following form:
index f9b2bfdc639a7c001955dbbb1a76047ab9dce474..c63a5cd817bef5a7f9f9b7d4d4822ebaa43d1227 100644 (file)
@@ -700,7 +700,7 @@ def patch_pairindextypes(app) -> None:
         pairindextypes.pop('object', None)
         pairindextypes.pop('exception', None)
         pairindextypes.pop('statement', None)
-        pairindextypes.pop('builtin', None)
+        pairindextypes.pop('builtin', None)
 
 
 def setup(app):
index 3fcf4e3f43a300e02375bc3e994fc2261c900528..f5cdd84cbadefe780c29c6bd6fe79a9d47abecc0 100644 (file)
@@ -285,7 +285,7 @@ Reading and Writing Files
 =========================
 
 .. index::
-   builtin: open
+   pair: built-in function; open
    pair: object; file
 
 :func:`open` returns a :term:`file object`, and is most commonly used with
index a94a7f459ea2b282c360f51a4f384de9bd880055..084b09a9e907f38225d8801056d0c2e8c2dd6cca 100644 (file)
@@ -24,7 +24,7 @@ Be sure to use the ``import os`` style instead of ``from os import *``.  This
 will keep :func:`os.open` from shadowing the built-in :func:`open` function which
 operates much differently.
 
-.. index:: builtin: help
+.. index:: pair: built-in function; help
 
 The built-in :func:`dir` and :func:`help` functions are useful as interactive
 aids for working with large modules like :mod:`os`::