Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 18ddf82

Browse files
committed
Add links from library/functions to other docs.
Suggested by Terry J. Reedy in #12298.
1 parent 9edd9f0 commit 18ddf82

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

Doc/library/functions.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,12 @@ are always available. They are listed here in alphabetical order.
8383

8484
.. function:: bool([x])
8585

86-
Convert a value to a Boolean, using the standard truth testing procedure. If
87-
*x* is false or omitted, this returns :const:`False`; otherwise it returns
88-
:const:`True`. :class:`bool` is also a class, which is a subclass of
89-
:class:`int`. Class :class:`bool` cannot be subclassed further. Its only
90-
instances are :const:`False` and :const:`True`.
86+
Convert a value to a Boolean, using the standard :ref:`truth testing
87+
procedure <truth>`. If *x* is false or omitted, this returns ``False``;
88+
otherwise it returns ``True``. :class:`bool` is also a class, which is a
89+
subclass of :class:`int` (see :ref:`typesnumeric`). Class :class:`bool`
90+
cannot be subclassed further. Its only instances are ``False`` and
91+
``True`` (see :ref:`bltin-boolean-values`).
9192

9293
.. index:: pair: Boolean; type
9394

@@ -1055,7 +1056,7 @@ are always available. They are listed here in alphabetical order.
10551056

10561057
Range objects implement the :class:`collections.Sequence` ABC, and provide
10571058
features such as containment tests, element index lookup, slicing and
1058-
support for negative indices:
1059+
support for negative indices (see :ref:`typesseq`):
10591060

10601061
>>> r = range(0, 20, 2)
10611062
>>> r

Doc/library/stdtypes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2712,6 +2712,8 @@ special operations. There is exactly one ellipsis object, named
27122712
It is written as ``Ellipsis`` or ``...``.
27132713

27142714

2715+
.. _bltin-notimplemented-object:
2716+
27152717
The NotImplemented Object
27162718
-------------------------
27172719

@@ -2722,6 +2724,8 @@ information.
27222724
It is written as ``NotImplemented``.
27232725

27242726

2727+
.. _bltin-boolean-values:
2728+
27252729
Boolean Values
27262730
--------------
27272731

0 commit comments

Comments
 (0)