Skip to content

GH-97950: Use new-style index directive ('object') #104158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/c-api/bytearray.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Byte Array Objects
------------------

.. index:: object: bytearray
.. index:: pair: object; bytearray


.. c:type:: PyByteArrayObject
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/bytes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Bytes Objects
These functions raise :exc:`TypeError` when expecting a bytes parameter and
called with a non-bytes parameter.

.. index:: object: bytes
.. index:: pair: object; bytes


.. c:type:: PyBytesObject
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/capsule.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Capsules
--------

.. index:: object: Capsule
.. index:: pair: object; Capsule

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

Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/complex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Complex Number Objects
----------------------

.. index:: object: complex number
.. index:: pair: object; complex number

Python's complex number objects are implemented as two distinct types when
viewed from the C API: one is the Python object exposed to Python programs, and
Expand Down
6 changes: 3 additions & 3 deletions Doc/c-api/concrete.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This section describes Python type objects and the singleton object ``None``.
Numeric Objects
===============

.. index:: object: numeric
.. index:: pair: object; numeric

.. toctree::

Expand All @@ -55,7 +55,7 @@ Numeric Objects
Sequence Objects
================

.. index:: object: sequence
.. index:: pair: object; sequence

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

.. index:: object: mapping
.. index:: pair: object; mapping

.. toctree::

Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/dict.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Dictionary Objects
------------------

.. index:: object: dictionary
.. index:: pair: object; dictionary


.. c:type:: PyDictObject
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
File Objects
------------

.. index:: object: file
.. index:: pair: object; file

These APIs are a minimal emulation of the Python 2 C API for built-in file
objects, which used to rely on the buffered I/O (:c:expr:`FILE*`) support
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/float.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Floating Point Objects
----------------------

.. index:: object: floating point
.. index:: pair: object; floating point


.. c:type:: PyFloatObject
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/function.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Function Objects
----------------

.. index:: object: function
.. index:: pair: object; function

There are a few functions specific to Python functions.

Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ complete listing.
Objects, Types and Reference Counts
===================================

.. index:: object: type
.. index:: pair: object; type

Most Python/C API functions have one or more arguments as well as a return value
of type :c:expr:`PyObject*`. This type is a pointer to an opaque data type
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
List Objects
------------

.. index:: object: list
.. index:: pair: object; list


.. c:type:: PyListObject
Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/long.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
Integer Objects
---------------

.. index:: object: long integer
object: integer
.. index:: pair: object; long integer
pair: object; integer

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

Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/memoryview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.. _memoryview-objects:

.. index::
object: memoryview
pair: object; memoryview

MemoryView objects
------------------
Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/method.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Instance Method Objects
-----------------------

.. index:: object: instancemethod
.. index:: pair: object; instancemethod

An instance method is a wrapper for a :c:data:`PyCFunction` and the new way
to bind a :c:data:`PyCFunction` to a class object. It replaces the former call
Expand Down Expand Up @@ -47,7 +47,7 @@ to bind a :c:data:`PyCFunction` to a class object. It replaces the former call
Method Objects
--------------

.. index:: object: method
.. index:: pair: object; method

Methods are bound function objects. Methods are always bound to an instance of
a user-defined class. Unbound methods (methods bound to a class object) are
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Module Objects
--------------

.. index:: object: module
.. index:: pair: object; module


.. c:var:: PyTypeObject PyModule_Type
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/none.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The ``None`` Object
-------------------

.. index:: object: None
.. index:: pair: object; None

Note that the :c:type:`PyTypeObject` for ``None`` is not directly exposed in the
Python/C API. Since ``None`` is a singleton, testing for object identity (using
Expand Down
4 changes: 2 additions & 2 deletions Doc/c-api/set.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Set Objects


.. index::
object: set
object: frozenset
pair: object; set
pair: object; frozenset

This section details the public API for :class:`set` and :class:`frozenset`
objects. Any functionality not listed below is best accessed using either
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/tuple.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Tuple Objects
-------------

.. index:: object: tuple
.. index:: pair: object; tuple


.. c:type:: PyTupleObject
Expand Down
2 changes: 1 addition & 1 deletion Doc/c-api/type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Type Objects
------------

.. index:: object: type
.. index:: pair: object; type


.. c:type:: PyTypeObject
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1830,7 +1830,7 @@ are always available. They are listed here in alphabetical order.
.. class:: type(object)
type(name, bases, dict, **kwds)

.. index:: object: type
.. index:: pair: object; type

With one argument, return the type of an *object*. The return value is a
type object and generally the same object as returned by
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/socket.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ all modern Unix systems, Windows, MacOS, and probably additional platforms.

.. include:: ../includes/wasm-notavail.rst

.. index:: object: socket
.. index:: pair: object; socket

The Python interface is a straightforward transliteration of the Unix system
call and library interface for sockets to Python's object-oriented style: the
Expand Down
50 changes: 25 additions & 25 deletions Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,11 @@ Numeric Types --- :class:`int`, :class:`float`, :class:`complex`
================================================================

.. index::
object: numeric
object: Boolean
object: integer
object: floating point
object: complex number
pair: object; numeric
pair: object; Boolean
pair: object; integer
pair: object; floating point
pair: object; complex number
pair: C; language

There are three distinct numeric types: :dfn:`integers`, :dfn:`floating
Expand Down Expand Up @@ -927,7 +927,7 @@ described in dedicated sections.
Common Sequence Operations
--------------------------

.. index:: object: sequence
.. index:: pair: object; sequence

The operations in the following table are supported by most sequence types,
both mutable and immutable. The :class:`collections.abc.Sequence` ABC is
Expand Down Expand Up @@ -1112,7 +1112,7 @@ Immutable Sequence Types

.. index::
triple: immutable; sequence; types
object: tuple
pair: object; tuple
builtin: hash

The only operation that immutable sequence types generally implement that is
Expand All @@ -1134,8 +1134,8 @@ Mutable Sequence Types

.. index::
triple: mutable; sequence; types
object: list
object: bytearray
pair: object; list
pair: object; bytearray

The operations in the following table are defined on mutable sequence types.
The :class:`collections.abc.MutableSequence` ABC is provided to make it
Expand Down Expand Up @@ -1252,7 +1252,7 @@ Notes:
Lists
-----

.. index:: object: list
.. index:: pair: object; list

Lists are mutable sequences, typically used to store collections of
homogeneous items (where the precise degree of similarity will vary by
Expand Down Expand Up @@ -1331,7 +1331,7 @@ application).
Tuples
------

.. index:: object: tuple
.. index:: pair: object; tuple

Tuples are immutable sequences, typically used to store collections of
heterogeneous data (such as the 2-tuples produced by the :func:`enumerate`
Expand Down Expand Up @@ -1375,7 +1375,7 @@ choice than a simple tuple object.
Ranges
------

.. index:: object: range
.. index:: pair: object; range

The :class:`range` type represents an immutable sequence of numbers and is
commonly used for looping a specific number of times in :keyword:`for`
Expand Down Expand Up @@ -1500,7 +1500,7 @@ objects that compare equal might have different :attr:`~range.start`,
.. index::
single: string; text sequence type
single: str (built-in class); (see also string)
object: string
pair: object; string

.. _textseq:

Expand Down Expand Up @@ -1534,7 +1534,7 @@ Since there is no separate "character" type, indexing a string produces
strings of length 1. That is, for a non-empty string *s*, ``s[0] == s[0:1]``.

.. index::
object: io.StringIO
pair: object; io.StringIO

There is also no mutable string type, but :meth:`str.join` or
:class:`io.StringIO` can be used to efficiently construct strings from
Expand Down Expand Up @@ -2508,9 +2508,9 @@ Binary Sequence Types --- :class:`bytes`, :class:`bytearray`, :class:`memoryview
=================================================================================

.. index::
object: bytes
object: bytearray
object: memoryview
pair: object; bytes
pair: object; bytearray
pair: object; memoryview
pair: module; array

The core built-in types for manipulating binary data are :class:`bytes` and
Expand All @@ -2526,7 +2526,7 @@ The :mod:`array` module supports efficient storage of basic data types like
Bytes Objects
-------------

.. index:: object: bytes
.. index:: pair: object; bytes

Bytes objects are immutable sequences of single bytes. Since many major
binary protocols are based on the ASCII text encoding, bytes objects offer
Expand Down Expand Up @@ -2633,7 +2633,7 @@ always convert a bytes object into a list of integers using ``list(b)``.
Bytearray Objects
-----------------

.. index:: object: bytearray
.. index:: pair: object; bytearray

:class:`bytearray` objects are a mutable counterpart to :class:`bytes`
objects.
Expand Down Expand Up @@ -4212,7 +4212,7 @@ copying.
Set Types --- :class:`set`, :class:`frozenset`
==============================================

.. index:: object: set
.. index:: pair: object; set

A :dfn:`set` object is an unordered collection of distinct :term:`hashable` objects.
Common uses include membership testing, removing duplicates from a sequence, and
Expand Down Expand Up @@ -4414,8 +4414,8 @@ Mapping Types --- :class:`dict`
===============================

.. index::
object: mapping
object: dictionary
pair: object; mapping
pair: object; dictionary
triple: operations on; mapping; types
triple: operations on; dictionary; type
statement: del
Expand Down Expand Up @@ -4889,7 +4889,7 @@ Generic Alias Type
------------------

.. index::
object: GenericAlias
pair: object; GenericAlias
pair: Generic; Alias

``GenericAlias`` objects are generally created by
Expand Down Expand Up @@ -5144,7 +5144,7 @@ Union Type
----------

.. index::
object: Union
pair: object; Union
pair: union; type

A union object holds the value of the ``|`` (bitwise or) operation on
Expand Down Expand Up @@ -5301,7 +5301,7 @@ See :ref:`function` for more information.
Methods
-------

.. index:: object: method
.. index:: pair: object; method

Methods are functions that are called using the attribute notation. There are
two flavors: built-in methods (such as :meth:`append` on lists) and class
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/sys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ always available.
object <traceback-objects>` which typically encapsulates the call
stack at the point where the exception last occurred.

.. index:: object: traceback
.. index:: pair: object; traceback

If no exception is being handled anywhere on the stack, this function
return a tuple containing three ``None`` values.
Expand Down
Loading