diff options
author | Mariatta <Mariatta@users.noreply.github.com> | 2017-06-02 04:56:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-02 04:56:24 (GMT) |
commit | 1c92c0edca413c6f8ce8ec326a67451ae751ead9 (patch) | |
tree | 230eaee42d532bc5662793783ab8c1236b424646 /Doc/reference | |
parent | e417d12d728103445b8516a35f643536e401f120 (diff) | |
download | cpython-1c92c0edca413c6f8ce8ec326a67451ae751ead9.zip cpython-1c92c0edca413c6f8ce8ec326a67451ae751ead9.tar.gz cpython-1c92c0edca413c6f8ce8ec326a67451ae751ead9.tar.bz2 |
bpo-30052: Link `bytes` & `bytearray` to stdtypes not functions (GH-1271) (GH-1915)
Builtin container types have two potential link targets in the docs:
- their entry in the list of builtin callables
- their type documentation
This change brings `bytes` and `bytearray` into line with other
container types by having cross-references default to linking to
their type documentation, rather than their builtin callable entry..
(cherry picked from commit c6db4811f9ea3aeff0e1fafe1c60a22835ef359e)
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/datamodel.rst | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 0e0a9e2..7c140a3 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -320,9 +320,9 @@ Sequences A bytes object is an immutable array. The items are 8-bit bytes, represented by integers in the range 0 <= x < 256. Bytes literals - (like ``b'abc'``) and the built-in function :func:`bytes` can be used to - construct bytes objects. Also, bytes objects can be decoded to strings - via the :meth:`~bytes.decode` method. + (like ``b'abc'``) and the built-in :func:`bytes()` constructor + can be used to create bytes objects. Also, bytes objects can be + decoded to strings via the :meth:`~bytes.decode` method. Mutable sequences .. index:: @@ -349,9 +349,9 @@ Sequences .. index:: bytearray A bytearray object is a mutable array. They are created by the built-in - :func:`bytearray` constructor. Aside from being mutable (and hence - unhashable), byte arrays otherwise provide the same interface and - functionality as immutable bytes objects. + :func:`bytearray` constructor. Aside from being mutable + (and hence unhashable), byte arrays otherwise provide the same interface + and functionality as immutable :class:`bytes` objects. .. index:: module: array @@ -1253,8 +1253,8 @@ Basic customization .. index:: builtin: bytes - Called by :func:`bytes` to compute a byte-string representation of an - object. This should return a ``bytes`` object. + Called by :ref:`bytes <func-bytes>` to compute a byte-string representation + of an object. This should return a :class:`bytes` object. .. index:: single: string; __format__() (object method) |