Skip to content

Commit f22bd48

Browse files
committed
Docs: module pages should not link to themselves
1 parent d5cb9f6 commit f22bd48

File tree

152 files changed

+680
-680
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+680
-680
lines changed

Doc/library/__future__.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,25 @@ before the release in which the feature becomes standard.
1515

1616
While these future statements are given additional special meaning by the
1717
Python compiler, they are still executed like any other import statement and
18-
the :mod:`__future__` exists and is handled by the import system the same way
18+
the :mod:`!__future__` exists and is handled by the import system the same way
1919
any other Python module would be. This design serves three purposes:
2020

2121
* To avoid confusing existing tools that analyze import statements and expect to
2222
find the modules they're importing.
2323

2424
* To document when incompatible changes were introduced, and when they will be
2525
--- or were --- made mandatory. This is a form of executable documentation, and
26-
can be inspected programmatically via importing :mod:`__future__` and examining
26+
can be inspected programmatically via importing :mod:`!__future__` and examining
2727
its contents.
2828

2929
* To ensure that :ref:`future statements <future>` run under releases prior to
30-
Python 2.1 at least yield runtime exceptions (the import of :mod:`__future__`
30+
Python 2.1 at least yield runtime exceptions (the import of :mod:`!__future__`
3131
will fail, because there was no module of that name prior to 2.1).
3232

3333
Module Contents
3434
---------------
3535

36-
No feature description will ever be deleted from :mod:`__future__`. Since its
36+
No feature description will ever be deleted from :mod:`!__future__`. Since its
3737
introduction in Python 2.1 the following features have found their way into the
3838
language using this mechanism:
3939

Doc/library/argparse.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
.. note::
1515

16-
While :mod:`argparse` is the default recommended standard library module
16+
While :mod:`!argparse` is the default recommended standard library module
1717
for implementing basic command line applications, authors with more
1818
exacting requirements for exactly how their command line applications
1919
behave may find it doesn't provide the necessary level of control.

Doc/library/ast.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
--------------
1717

18-
The :mod:`ast` module helps Python applications to process trees of the Python
18+
The :mod:`!ast` module helps Python applications to process trees of the Python
1919
abstract syntax grammar. The abstract syntax itself might change with each
2020
Python release; this module helps to find out programmatically what the current
2121
grammar looks like.
@@ -46,7 +46,7 @@ Node classes
4646
This is the base of all AST node classes. The actual node classes are
4747
derived from the :file:`Parser/Python.asdl` file, which is reproduced
4848
:ref:`above <abstract-grammar>`. They are defined in the :mod:`!_ast` C
49-
module and re-exported in :mod:`ast`.
49+
module and re-exported in :mod:`!ast`.
5050

5151
There is one class defined for each left-hand side symbol in the abstract
5252
grammar (for example, :class:`ast.stmt` or :class:`ast.expr`). In addition,
@@ -2200,10 +2200,10 @@ Async and await
22002200
occurrences of the same value (for example, :class:`ast.Add`).
22012201

22022202

2203-
:mod:`ast` helpers
2203+
:mod:`!ast` helpers
22042204
------------------
22052205

2206-
Apart from the node classes, the :mod:`ast` module defines these utility functions
2206+
Apart from the node classes, the :mod:`!ast` module defines these utility functions
22072207
and classes for traversing abstract syntax trees:
22082208

22092209
.. function:: parse(source, filename='<unknown>', mode='exec', *, type_comments=False, feature_version=None, optimize=-1, module=None)
@@ -2576,7 +2576,7 @@ Command-line usage
25762576

25772577
.. versionadded:: 3.9
25782578

2579-
The :mod:`ast` module can be executed as a script from the command line.
2579+
The :mod:`!ast` module can be executed as a script from the command line.
25802580
It is as simple as:
25812581

25822582
.. code-block:: sh

Doc/library/atexit.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
--------------
1111

12-
The :mod:`atexit` module defines functions to register and unregister cleanup
12+
The :mod:`!atexit` module defines functions to register and unregister cleanup
1313
functions. Functions thus registered are automatically executed upon normal
14-
interpreter termination. :mod:`atexit` runs these functions in the *reverse*
14+
interpreter termination. :mod:`!atexit` runs these functions in the *reverse*
1515
order in which they were registered; if you register ``A``, ``B``, and ``C``,
1616
at interpreter termination time they will be run in the order ``C``, ``B``,
1717
``A``.
@@ -64,21 +64,21 @@ a cleanup function is undefined.
6464
Remove *func* from the list of functions to be run at interpreter shutdown.
6565
:func:`unregister` silently does nothing if *func* was not previously
6666
registered. If *func* has been registered more than once, every occurrence
67-
of that function in the :mod:`atexit` call stack will be removed. Equality
67+
of that function in the :mod:`!atexit` call stack will be removed. Equality
6868
comparisons (``==``) are used internally during unregistration, so function
6969
references do not need to have matching identities.
7070

7171

7272
.. seealso::
7373

7474
Module :mod:`readline`
75-
Useful example of :mod:`atexit` to read and write :mod:`readline` history
75+
Useful example of :mod:`!atexit` to read and write :mod:`readline` history
7676
files.
7777

7878

7979
.. _atexit-example:
8080

81-
:mod:`atexit` Example
81+
:mod:`!atexit` Example
8282
---------------------
8383

8484
The following simple example demonstrates how a module can initialize a counter

Doc/library/bdb.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
--------------
1010

11-
The :mod:`bdb` module handles basic debugger functions, like setting breakpoints
11+
The :mod:`!bdb` module handles basic debugger functions, like setting breakpoints
1212
or managing execution via the debugger.
1313

1414
The following exception is defined:
@@ -18,7 +18,7 @@ The following exception is defined:
1818
Exception raised by the :class:`Bdb` class for quitting the debugger.
1919

2020

21-
The :mod:`bdb` module also defines two classes:
21+
The :mod:`!bdb` module also defines two classes:
2222

2323
.. class:: Breakpoint(self, file, line, temporary=False, cond=None, funcname=None)
2424

Doc/library/binascii.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
--------------
1212

13-
The :mod:`binascii` module contains a number of methods to convert between
13+
The :mod:`!binascii` module contains a number of methods to convert between
1414
binary and various ASCII-encoded binary representations. Normally, you will not
1515
use these functions directly but use wrapper modules like
16-
:mod:`base64` instead. The :mod:`binascii` module contains
16+
:mod:`base64` instead. The :mod:`!binascii` module contains
1717
low-level functions written in C for greater speed that are used by the
1818
higher-level modules.
1919

@@ -28,7 +28,7 @@ higher-level modules.
2828
ASCII-only unicode strings are now accepted by the ``a2b_*`` functions.
2929

3030

31-
The :mod:`binascii` module defines the following functions:
31+
The :mod:`!binascii` module defines the following functions:
3232

3333

3434
.. function:: a2b_uu(string)

Doc/library/bisect.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ having to sort the list after each insertion. For long lists of items with
1616
expensive comparison operations, this can be an improvement over
1717
linear searches or frequent resorting.
1818

19-
The module is called :mod:`bisect` because it uses a basic bisection
19+
The module is called :mod:`!bisect` because it uses a basic bisection
2020
algorithm to do its work. Unlike other bisection tools that search for a
2121
specific value, the functions in this module are designed to locate an
2222
insertion point. Accordingly, the functions never call an :meth:`~object.__eq__`
@@ -27,9 +27,9 @@ point between values in an array.
2727
.. note::
2828

2929
The functions in this module are not thread-safe. If multiple threads
30-
concurrently use :mod:`bisect` functions on the same sequence, this
30+
concurrently use :mod:`!bisect` functions on the same sequence, this
3131
may result in undefined behaviour. Likewise, if the provided sequence
32-
is mutated by a different thread while a :mod:`bisect` function
32+
is mutated by a different thread while a :mod:`!bisect` function
3333
is operating on it, the result is undefined. For example, using
3434
:py:func:`~bisect.insort_left` on the same list from multiple threads
3535
may result in the list becoming unsorted.

Doc/library/bz2.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
This module provides a comprehensive interface for compressing and
1717
decompressing data using the bzip2 compression algorithm.
1818

19-
The :mod:`bz2` module contains:
19+
The :mod:`!bz2` module contains:
2020

2121
* The :func:`.open` function and :class:`BZ2File` class for reading and
2222
writing compressed files.
@@ -317,7 +317,7 @@ One-shot (de)compression
317317
Examples of usage
318318
-----------------
319319

320-
Below are some examples of typical usage of the :mod:`bz2` module.
320+
Below are some examples of typical usage of the :mod:`!bz2` module.
321321

322322
Using :func:`compress` and :func:`decompress` to demonstrate round-trip compression:
323323

Doc/library/calendar.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ For simple text calendars this module provides the following functions.
452452
inverse.
453453

454454

455-
The :mod:`calendar` module exports the following data attributes:
455+
The :mod:`!calendar` module exports the following data attributes:
456456

457457
.. data:: day_name
458458

@@ -578,7 +578,7 @@ The :mod:`calendar` module exports the following data attributes:
578578
.. versionadded:: 3.12
579579

580580

581-
The :mod:`calendar` module defines the following exceptions:
581+
The :mod:`!calendar` module defines the following exceptions:
582582

583583
.. exception:: IllegalMonthError(month)
584584

@@ -617,7 +617,7 @@ Command-line usage
617617

618618
.. versionadded:: 2.5
619619

620-
The :mod:`calendar` module can be executed as a script from the command line
620+
The :mod:`!calendar` module can be executed as a script from the command line
621621
to interactively print a calendar.
622622

623623
.. code-block:: shell

Doc/library/cmath.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ rectangular coordinates to polar coordinates and back.
124124

125125
The modulus (absolute value) of a complex number *z* can be
126126
computed using the built-in :func:`abs` function. There is no
127-
separate :mod:`cmath` module function for this operation.
127+
separate :mod:`!cmath` module function for this operation.
128128

129129

130130
.. function:: polar(z)
@@ -357,7 +357,7 @@ Note that the selection of functions is similar, but not identical, to that in
357357
module :mod:`math`. The reason for having two modules is that some users aren't
358358
interested in complex numbers, and perhaps don't even know what they are. They
359359
would rather have ``math.sqrt(-1)`` raise an exception than return a complex
360-
number. Also note that the functions defined in :mod:`cmath` always return a
360+
number. Also note that the functions defined in :mod:`!cmath` always return a
361361
complex number, even if the answer can be expressed as a real number (in which
362362
case the complex number has an imaginary part of zero).
363363

0 commit comments

Comments
 (0)