summaryrefslogtreecommitdiffstats
path: root/Doc/library/functions.rst
diff options
context:
space:
mode:
authorcsabella <chekat2@gmail.com>2017-04-26 05:47:01 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2017-04-26 05:47:01 (GMT)
commitc6db4811f9ea3aeff0e1fafe1c60a22835ef359e (patch)
treeb27d11afad8a52fc60ce80108279e67c1a59539c /Doc/library/functions.rst
parentd819ad9832292d854e9710493ecdf959b69802e3 (diff)
downloadcpython-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/library/functions.rst')
-rw-r--r--Doc/library/functions.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 138f7d0..6621f4a 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -16,8 +16,8 @@ are always available. They are listed here in alphabetical order.
:func:`ascii` :func:`enumerate` :func:`input` :func:`oct` :func:`staticmethod`
:func:`bin` :func:`eval` :func:`int` :func:`open` |func-str|_
:func:`bool` :func:`exec` :func:`isinstance` :func:`ord` :func:`sum`
-:func:`bytearray` :func:`filter` :func:`issubclass` :func:`pow` :func:`super`
-:func:`bytes` :func:`float` :func:`iter` :func:`print` |func-tuple|_
+|func-bytearray|_ :func:`filter` :func:`issubclass` :func:`pow` :func:`super`
+|func-bytes|_ :func:`float` :func:`iter` :func:`print` |func-tuple|_
:func:`callable` :func:`format` :func:`len` :func:`property` :func:`type`
:func:`chr` |func-frozenset|_ |func-list|_ |func-range|_ :func:`vars`
:func:`classmethod` :func:`getattr` :func:`locals` :func:`repr` :func:`zip`
@@ -37,7 +37,8 @@ are always available. They are listed here in alphabetical order.
.. |func-str| replace:: ``str()``
.. |func-tuple| replace:: ``tuple()``
.. |func-range| replace:: ``range()``
-
+.. |func-bytearray| replace:: ``bytearray()``
+.. |func-bytes| replace:: ``bytes()``
.. function:: abs(x)
@@ -99,6 +100,7 @@ are always available. They are listed here in alphabetical order.
.. _func-bytearray:
.. class:: bytearray([source[, encoding[, errors]]])
+ :noindex:
Return a new array of bytes. The :class:`bytearray` class is a mutable
sequence of integers in the range 0 <= x < 256. It has most of the usual
@@ -128,6 +130,7 @@ are always available. They are listed here in alphabetical order.
.. _func-bytes:
.. class:: bytes([source[, encoding[, errors]]])
+ :noindex:
Return a new "bytes" object, which is an immutable sequence of integers in
the range ``0 <= x < 256``. :class:`bytes` is an immutable version of