diff options
author | csabella <chekat2@gmail.com> | 2017-04-26 05:47:01 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2017-04-26 05:47:01 (GMT) |
commit | c6db4811f9ea3aeff0e1fafe1c60a22835ef359e (patch) | |
tree | b27d11afad8a52fc60ce80108279e67c1a59539c /Doc/reference | |
parent | d819ad9832292d854e9710493ecdf959b69802e3 (diff) | |
download | cpython-c6db4811f9ea3aeff0e1fafe1c60a22835ef359e.zip cpython-c6db4811f9ea3aeff0e1fafe1c60a22835ef359e.tar.gz cpython-c6db4811f9ea3aeff0e1fafe1c60a22835ef359e.tar.bz2 |
bpo-30052: Link `bytes` & `bytearray` to stdtypes not functions (GH-1271)
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.
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 058fa90..4b49bfd 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) |