Skip to content

Commit 465d84b

Browse files
committed
docs/library: Add CPython docs xref to each pertinent module.
Cross-reference text/link is implemented as RST substitution, so easy to consistently.
1 parent ebce798 commit 465d84b

21 files changed

+53
-8
lines changed

docs/library/array.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
.. module:: array
55
:synopsis: efficient arrays of numeric data
66

7-
See `Python array <https://docs.python.org/3/library/array.html>`_ for more
8-
information.
7+
|see_cpython_module| :mod:`python:array`.
98

109
Supported format codes: ``b``, ``B``, ``h``, ``H``, ``i``, ``I``, ``l``,
1110
``L``, ``q``, ``Q``, ``f``, ``d`` (the latter 2 depending on the

docs/library/builtins.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Functions and types
2121

2222
.. class:: bytes()
2323

24+
|see_cpython| `python:bytes`.
25+
2426
.. function:: callable()
2527

2628
.. function:: chr()
@@ -174,6 +176,10 @@ Exceptions
174176

175177
.. exception:: OSError
176178

179+
|see_cpython| `python:OSError`. MicroPython doesn't implement ``errno``
180+
attribute, instead use the standard way to access exception arguments:
181+
``exc.args[0]``.
182+
177183
.. exception:: RuntimeError
178184

179185
.. exception:: StopIteration
@@ -182,8 +188,12 @@ Exceptions
182188

183189
.. exception:: SystemExit
184190

191+
|see_cpython| `python:SystemExit`.
192+
185193
.. exception:: TypeError
186194

195+
|see_cpython| `python:TypeError`.
196+
187197
.. exception:: ValueError
188198

189199
.. exception:: ZeroDivisionError

docs/library/cmath.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
.. module:: cmath
55
:synopsis: mathematical functions for complex numbers
66

7+
|see_cpython_module| :mod:`python:cmath`.
8+
79
The ``cmath`` module provides some basic mathematical functions for
810
working with complex numbers.
911

docs/library/gc.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
.. module:: gc
55
:synopsis: control the garbage collector
66

7+
|see_cpython_module| :mod:`python:gc`.
8+
79
Functions
810
---------
911

docs/library/math.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
.. module:: math
55
:synopsis: mathematical functions
66

7+
|see_cpython_module| :mod:`python:math`.
8+
79
The ``math`` module provides some basic mathematical functions for
810
working with floating-point numbers.
911

docs/library/sys.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
.. module:: sys
55
:synopsis: system specific functions
66

7+
|see_cpython_module| :mod:`python:sys`.
8+
79
Functions
810
---------
911

docs/library/ubinascii.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
.. module:: ubinascii
55
:synopsis: binary/ASCII conversions
66

7+
|see_cpython_module| :mod:`python:binascii`.
8+
79
This module implements conversions between binary data and various
810
encodings of it in ASCII form (in both directions).
911

docs/library/ucollections.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
.. module:: ucollections
55
:synopsis: collection and container types
66

7+
|see_cpython_module| :mod:`python:collections`.
8+
79
This module implements advanced collection and container types to
810
hold/accumulate various objects.
911

docs/library/uhashlib.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
.. module:: uhashlib
55
:synopsis: hashing algorithms
66

7+
|see_cpython_module| :mod:`python:hashlib`.
8+
79
This module implements binary data hashing algorithms. The exact inventory
810
of available algorithms depends on a board. Among the algorithms which may
911
be implemented:

docs/library/uheapq.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
.. module:: uheapq
55
:synopsis: heap queue algorithm
66

7+
|see_cpython_module| :mod:`python:heapq`.
8+
79
This module implements the heap queue algorithm.
810

911
A heap queue is simply a list that has its elements stored in a certain way.

0 commit comments

Comments
 (0)