Skip to content

modules shouldn't link themselves in their documentations #133291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Yzi-Li opened this issue May 2, 2025 · 2 comments
Closed

modules shouldn't link themselves in their documentations #133291

Yzi-Li opened this issue May 2, 2025 · 2 comments
Labels
docs Documentation in the Doc dir

Comments

@Yzi-Li
Copy link
Contributor

Yzi-Li commented May 2, 2025

Documentation

Some modules (e.g. __future__, ast) use :mod:`ast` to link themselves in the text. But this is meaningless. We should use :mod:`!ast` to suppress references.

I am working on this issue.

@Yzi-Li Yzi-Li added the docs Documentation in the Doc dir label May 2, 2025
@StanFromIreland
Copy link
Contributor

StanFromIreland commented May 2, 2025

There are a few thousand instances across a lot files.

List of all occurances in Doc/library
Match in ./sys.rst:
2134:   major and minor versions of the running Python interpreter.  It is provided in the :mod:`sys`

Match in ./pyclbr.rst:
13:The :mod:`pyclbr` module provides limited information about the

Match in ./py_compile.rst:
16:The :mod:`py_compile` module provides a function to generate a byte-code file

Match in ./curses.rst:
16:The :mod:`curses` module provides an interface to the curses library, the
55:The module :mod:`curses` defines the following exception:
68:The module :mod:`curses` defines the following functions:
565:   blue, magenta, cyan, and white), and two global variables in the :mod:`curses`
1003:   If *flag* is ``True``, :mod:`curses` will try and use hardware line
1087:   will be interpreted by :mod:`curses`. If *flag* is ``False``, escape sequences will be
1313:The :mod:`curses` module defines the following data members:

Match in ./zipimport.rst:
15:needed to use the :mod:`zipimport` module explicitly; it is automatically used
187::mod:`zipimport` module is not explicitly used.

Match in ./locale.rst:
14:The :mod:`locale` module opens access to the POSIX locale database and
21:The :mod:`locale` module is implemented on top of the :mod:`!_locale` module,
24:The :mod:`locale` module defines the following exception and functions:
518:   :func:`strxfrm` of the :mod:`locale` module are affected.
547:   :func:`atoi`, :func:`atof` and :func:`.str` of the :mod:`locale` module are
628:When Python code uses the :mod:`locale` module to change the locale, this also

Match in ./hashlib.rst:
64::mod:`hashlib` was linked against a build of OpenSSL that provides others.
393::mod:`hashlib` objects.

Match in ./gettext.rst:
14:The :mod:`gettext` module provides internationalization (I18N) and localization
28:The :mod:`gettext` module defines the following API, which is very similar to
40:   :mod:`gettext` will look for binary :file:`.mo` files for the given domain using
117:The class-based API of the :mod:`gettext` module gives you more flexibility and
396:GNOME uses a version of the :mod:`gettext` module by James Henstridge, but this
428:#. use the :mod:`gettext` module so that message strings are properly translated
476::mod:`gettext` module for the actual translation processing at
479:How you use the :mod:`gettext` module in your code depends on whether you are

Match in ./xmlrpc.server.rst:
14:The :mod:`xmlrpc.server` module provides a basic server framework for XML-RPC
22:   The :mod:`xmlrpc.server` module is not secure against maliciously

Match in ./winreg.rst:
539:The following constants are defined for use in many :mod:`winreg` functions.

Match in ./ftplib.rst:
26:Here's a sample session using the :mod:`ftplib` module::

Match in ./dis.rst:
17:The :mod:`dis` module supports the analysis of CPython :term:`bytecode` by
41:      any :mod:`dis` utility. Furthermore, the interpreter now adapts the
90:The :mod:`dis` module can be invoked as a script from the command line:
226:The :mod:`dis` module also defines the following analysis functions that convert
1776:      Pseudo instructions were added to the :mod:`dis` module, and for them

Match in ./secrets.rst:
20:The :mod:`secrets` module is used for generating cryptographically strong
24:In particular, :mod:`secrets` should be used in preference to the
36:The :mod:`secrets` module provides access to the most secure source of
61:The :mod:`secrets` module provides functions for generating secure
110:the typical use-case expected for the :mod:`secrets` module.
142:This section shows recipes and best practices for using :mod:`secrets`

Match in ./getpass.rst:
17:The :mod:`getpass` module provides two functions:

Match in ./calendar.rst:
450:The :mod:`calendar` module exports the following data attributes:
543:The :mod:`calendar` module defines the following exceptions:
582:The :mod:`calendar` module can be executed as a script from the command line

Match in ./marshal.rst:
23::mod:`shelve`.  The :mod:`marshal` module exists mainly to support reading and
37:   The :mod:`marshal` module is not intended to be secure against erroneous or

Match in ./xml.rst:
25:It is important to note that modules in the :mod:`xml` package require that

Match in ./pdb.rst:
3::mod:`pdb` --- The Python Debugger
15:The module :mod:`pdb` defines an interactive source code debugger for Python
80:You can also invoke :mod:`pdb` from the command line to debug other scripts.  For
381:   documentation (the docstring of the :mod:`pdb` module).  Since the *command*

Match in ./wave.rst:
14:The :mod:`wave` module provides a convenient interface to the Waveform Audio
23:The :mod:`wave` module defines the following function and exception:
75:      Close the stream if it was opened by :mod:`wave`, and make the instance
192:      :mod:`wave`.  This method is called upon object collection.  It will raise

Match in ./gc.rst:
23:The :mod:`gc` module provides the following functions:

Match in ./uuid.rst:
171:The :mod:`uuid` module defines the following functions:
263:The :mod:`uuid` module defines the following namespace identifiers for use with
288:The :mod:`uuid` module defines the following constants for the possible values
314:The :mod:`uuid` module defines the special Nil and Max UUID values:
347:The :mod:`uuid` module can be executed as a script from the command line.
396:Here are some examples of typical usage of the :mod:`uuid` module::
454:Here are some examples of typical usage of the :mod:`uuid` command-line interface:

Match in ./xml.sax.handler.rst:
19:module :mod:`xml.sax.handler`, so that all methods get default implementations.
56:In addition to these classes, :mod:`xml.sax.handler` provides symbolic constants

Match in ./colorsys.rst:
13:The :mod:`colorsys` module defines bidirectional conversions of color values
27:The :mod:`colorsys` module defines the following functions:

Match in ./filecmp.rst:
13:The :mod:`filecmp` module defines functions to compare files and directories,
17:The :mod:`filecmp` module defines the following functions:

Match in ./unittest.mock.rst:
16::mod:`unittest.mock` is a library for testing in Python. It allows you to
20::mod:`unittest.mock` provides a core :class:`Mock` class removing the need to
36:There is a backport of :mod:`unittest.mock` for earlier versions of Python,
2641::mod:`unittest.mock` already provides a feature to help with this, called speccing. If you

Match in ./tkinter.ttk.rst:
15:The :mod:`tkinter.ttk` module provides access to the Tk themed widget set,
20:The basic idea for :mod:`tkinter.ttk` is to separate, to the extent possible,
43:That code causes several :mod:`tkinter.ttk` widgets (:class:`Button`,

Match in ./shlex.rst:
21:The :mod:`shlex` module defines the following functions:
101:The :mod:`shlex` module defines the following class:
217:   This convenience is provided to encourage :mod:`shlex` users to generate error

Match in ./csv.rst:
28:The :mod:`csv` module implements classes to read and write tabular data in CSV
35:The :mod:`csv` module's :class:`reader` and :class:`writer` objects read and
50:The :mod:`csv` module defines the following functions:
148:The :mod:`csv` module defines the following classes:
316:The :mod:`csv` module defines the following constants:
368:The :mod:`csv` module defines the following exception:

Match in ./binascii.rst:
13:The :mod:`binascii` module contains a number of methods to convert between
16::mod:`base64` instead. The :mod:`binascii` module contains
31:The :mod:`binascii` module defines the following functions:

Match in ./logging.handlers.rst:
163:The :class:`WatchedFileHandler` class, located in the :mod:`logging.handlers`
216:The :class:`BaseRotatingHandler` class, located in the :mod:`logging.handlers`
310:The :class:`RotatingFileHandler` class, located in the :mod:`logging.handlers`
361::mod:`logging.handlers` module, supports rotation of disk log files at certain
469:The :class:`SocketHandler` class, located in the :mod:`logging.handlers` module,
565:The :class:`DatagramHandler` class, located in the :mod:`logging.handlers`
612:The :class:`SysLogHandler` class, located in the :mod:`logging.handlers` module,
791:The :class:`NTEventLogHandler` class, located in the :mod:`logging.handlers`
858:The :class:`SMTPHandler` class, located in the :mod:`logging.handlers` module,
899:The :class:`MemoryHandler` class, located in the :mod:`logging.handlers` module,
979:The :class:`HTTPHandler` class, located in the :mod:`logging.handlers` module,
1031:The :class:`QueueHandler` class, located in the :mod:`logging.handlers` module,
1115:The :class:`QueueListener` class, located in the :mod:`logging.handlers`

Match in ./readline.rst:
12:The :mod:`readline` module defines a number of functions to facilitate
33:  On macOS the :mod:`readline` module detects which library is being used
256:the interactive interpreter.  If the :mod:`readline` module is to be used
325:The following example demonstrates how to use the :mod:`readline` module's

Match in ./imaplib.rst:
32:Three classes are provided by the :mod:`imaplib` module, :class:`IMAP4` is the

Match in ./email.errors.rst:
11:The following exception classes are defined in the :mod:`email.errors` module:

Match in ./ipaddress.rst:
13::mod:`ipaddress` provides the capabilities to create, manipulate and
37:The :mod:`ipaddress` module provides factory functions to conveniently create
1020:   have :mod:`ipaddress` sort these anyway.  If you need to do this, you can use

Match in ./email.charset.rst:
22:Import this class from the :mod:`email.charset` module.
167:The :mod:`email.charset` module also provides the following functions for adding

Match in ./email.utils.rst:
11:There are a couple of useful utilities provided in the :mod:`email.utils`

Match in ./bisect.rst:
19:The module is called :mod:`bisect` because it uses a basic bisection

Match in ./queue.rst:
11:The :mod:`queue` module implements multi-producer, multi-consumer queues.
33:The :mod:`queue` module defines the following classes and exceptions:

Match in ./fcntl.rst:
56:   On Linux >= 4.5, the :mod:`fcntl` module exposes the ``FICLONE`` and
94:   in the :mod:`fcntl` module, using the same names as used in the relevant C

Match in ./tkinter.scrolledtext.rst:
14:The :mod:`tkinter.scrolledtext` module provides a class of the same name which

Match in ./mimetypes.rst:
15:The :mod:`mimetypes` module converts between a filename or URL and the MIME type
199::mod:`mimetypes` module.

Match in ./tkinter.colorchooser.rst:
12:The :mod:`tkinter.colorchooser` module provides the :class:`Chooser` class

Match in ./profile.rst:
20::mod:`cProfile` and :mod:`profile` provide :dfn:`deterministic profiling` of
33:2. :mod:`profile`, a pure Python module whose interface is imitated by
63:(Use :mod:`profile` instead of :mod:`cProfile` if the latter is not available on
128:The files :mod:`cProfile` and :mod:`profile` can also be invoked as a script to
151:      Added the ``-m`` option to :mod:`profile`.
220::mod:`profile` and :mod:`cProfile` Module Reference
227:Both the :mod:`profile` and :mod:`cProfile` modules provide the following
357:   corresponding version of :mod:`profile` or :mod:`cProfile`.  To be specific,
528:      * With :mod:`profile`, a number is shown in parentheses after each caller
614:The problem is more important with :mod:`profile` than with the lower-overhead
615::mod:`cProfile`.  For this reason, :mod:`profile` provides a means of
630:The profiler of the :mod:`profile` module subtracts a constant from each event

Match in ./ensurepip.rst:
14:The :mod:`ensurepip` package provides support for bootstrapping the ``pip``
98::mod:`ensurepip` exposes two functions for programmatic use:

Match in ./shelve.rst:
64:   Because the :mod:`shelve` module is backed by :mod:`pickle`, it is insecure
109:* The :mod:`shelve` module does not support *concurrent* read/write access to
222:      Object serialization used by :mod:`shelve`.

Match in ./concurrent.futures.rst:
14:The :mod:`concurrent.futures` module provides a high-level interface for

Match in ./importlib.rst:
20:The purpose of the :mod:`importlib` package is three-fold.

Match in ./tty.rst:
15:The :mod:`tty` module defines functions for putting the tty into cbreak and raw
22:The :mod:`tty` module defines the following functions:

Match in ./timeit.rst:
358:To give the :mod:`timeit` module access to functions you define, you can pass a

Match in ./signal.rst:
111:The variables defined in the :mod:`signal` module are:
325:The :mod:`signal` module defines one exception:
339:The :mod:`signal` module defines the following functions:

Match in ./urllib.parse.rst:
38:The :mod:`urllib.parse` module defines functions that fall into two broad

Match in ./functools.rst:
23:The :mod:`functools` module is for higher-order functions: functions that act on
27:The :mod:`functools` module defines the following functions:

Match in ./codeop.rst:
14:The :mod:`codeop` module provides utilities upon which the Python
28:The :mod:`codeop` module provides a way of doing each of these things, and a way

Match in ./email.message.rst:
17:class, imported from the :mod:`email.message` module.  It is the base class for

Match in ./__future__.rst:
18:the :mod:`__future__` exists and is handled by the import system the same way
26:  can be inspected programmatically via importing :mod:`__future__` and examining
30:  Python 2.1 at least yield runtime exceptions (the import of :mod:`__future__`
36:No feature description will ever be deleted from :mod:`__future__`. Since its

Match in ./pty.rst:
15:The :mod:`pty` module defines operations for handling the pseudo-terminal
25:The :mod:`pty` module defines the following functions:

Match in ./runpy.rst:
13:The :mod:`runpy` module is used to locate and run Python modules without
23:guaranteed to work correctly after a :mod:`runpy` function has returned.
27:The :mod:`runpy` module provides two functions:

Match in ./http.cookiejar.rst:
14:The :mod:`http.cookiejar` module defines classes for automatic handling of HTTP
24::mod:`http.cookiejar` attempts to follow the de-facto Netscape cookie protocol (which
112:   expected that users of :mod:`http.cookiejar` construct their own :class:`Cookie`
124:      :mod:`http.cookiejar` and :mod:`http.cookies` modules do not depend on each
130:      the major browsers (and :mod:`http.cookiejar`) only bears a passing resemblance to
620:may be 'downgraded' by :mod:`http.cookiejar` from version 1 to version 0 (Netscape)
632:   :mod:`http.cookiejar` may 'downgrade' RFC 2109 cookies to Netscape cookies, in which
695:   :mod:`http.cookiejar` may 'downgrade' RFC 2109 cookies to Netscape cookies, in
747:The first example shows the most common usage of :mod:`http.cookiejar`::

Match in ./socket.rst:
86:  :mod:`socket` module methods, *flowinfo* and *scope_id* can be omitted just for
305:The module :mod:`socket` exports the following elements.
1031:The :mod:`socket` module also offers various network-related services:
2418:There is a :mod:`socket` flag to set, in order to prevent this,

Match in ./ssl.rst:
131:   the given *purpose*.  The settings are chosen by the :mod:`ssl` module,
1454:      :func:`create_default_context` lets the :mod:`ssl` module choose

Match in ./xml.sax.rst:
15:The :mod:`xml.sax` package provides a number of modules which implement the
23:   The :mod:`xml.sax` module is not secure against maliciously
93::mod:`xml.sax`.  These interfaces are described below.
95:In addition to these classes, :mod:`xml.sax` provides the following exception

Match in ./termios.rst:
41:   constants defined in the :mod:`termios` module.

Match in ./tokenize.rst:
14:The :mod:`tokenize` module provides a lexical scanner for Python source code,
81::mod:`tokenize`.
157:The :mod:`tokenize` module can be executed as a script from the command line.

Match in ./inspect.rst:
19:The :mod:`inspect` module provides several useful functions to help get
1732:   It's recommended to use public APIs from the :mod:`inspect` module
1774:The :mod:`inspect` module also provides a basic introspection capability

Match in ./glob.rst:
21:The :mod:`glob` module finds all the pathnames matching a specified pattern
37:The :mod:`glob` module defines the following functions:

Match in ./codecs.rst:
287:The :mod:`codecs` module defines a set of base classes which define the

Match in ./tkinter.rst:
13:The :mod:`tkinter` package ("Tk interface") is the standard Python interface to
14:the Tcl/Tk GUI toolkit.  Both Tk and :mod:`tkinter` are available on most Unix
18:demonstrating a simple Tk interface, letting you know that :mod:`tkinter` is
109:the :mod:`tkinter` module first assembles a Tcl/Tk command string. It passes that
119:main :mod:`tkinter` module, as well as the :mod:`tkinter.ttk` module, which provides
205::mod:`tkinter`
231:   for many of the classic widgets in the main :mod:`tkinter` module.
240:   It is automatically imported by the main :mod:`tkinter` module,
247:   on :mod:`tkinter`.
252:   main :mod:`tkinter` module.
255:   (experimental) Drag-and-drop support for :mod:`tkinter`. This will
505:Python and Tcl/Tk have very different threading models, which :mod:`tkinter`
513:Each :class:`Tk` object created by :mod:`tkinter` contains a Tcl interpreter.
515::mod:`tkinter` can be made from any Python thread. Internally, if a call comes
530::mod:`tkinter` calls made from threads other than the one running the Tcl
536:  :mod:`tkinter` calls the library from the originating Python thread, even
540:* While :mod:`tkinter` allows you to create more than one instance of a :class:`Tk`
551:* There are a few select :mod:`tkinter` functions that presently work only when
701:Unfortunately, in the current implementation of :mod:`tkinter` it is not
705:defined in :mod:`tkinter`.
753:placement, icon bitmaps, and the like.  In :mod:`tkinter`, these commands have
936:   displayed.  You can use these :mod:`tkinter` functions to access these special

Match in ./logging.config.rst:
31::mod:`logging.config` module.  Their use is optional --- you can configure the
58:   has a :meth:`configure` method.  The :mod:`logging.config` module

Match in ./shutil.rst:
18:The :mod:`shutil` module offers a number of high-level operations on files and
654:   By default :mod:`shutil` provides these formats:
769:   By default :mod:`shutil` provides these formats:

Match in ./copy.rst:
83:methods.  In fact, the :mod:`copy` module uses the registered

Match in ./webbrowser.rst:
14:The :mod:`webbrowser` module provides a high-level interface to allow displaying
49::mod:`webbrowser` module on iOS requires the :mod:`ctypes` module. If

Match in ./socketserver.rst:
11:The :mod:`socketserver` module simplifies the task of writing network servers.

Match in ./tkinter.messagebox.rst:
12:The :mod:`tkinter.messagebox` module provides a template base class as well as

Match in ./math.rst:
820:   The :mod:`math` module consists mostly of thin wrappers around the platform C

Match in ./http.cookies.rst:
14:The :mod:`http.cookies` module defines classes for abstracting the concept of
68:      :mod:`http.cookies` modules do not depend on each other.
264:The following example demonstrates how to use the :mod:`http.cookies` module.

Match in ./optparse.rst:
23:* :mod:`optparse`: a declarative replacement for ``getopt`` that
40::mod:`optparse` should be considered as an alternative to :mod:`argparse` in the
43:* an application is already using :mod:`optparse` and doesn't want to risk the
58:These considerations also mean that :mod:`optparse` is likely to provide a
129::mod:`optparse` is a more convenient, flexible, and powerful library for parsing
131::mod:`optparse` uses a more declarative style of command-line parsing:
134::mod:`optparse` allows users to specify options in the conventional
137:Here's an example of using :mod:`optparse` in a simple script::
155:As it parses the command line, :mod:`optparse` sets attributes of the
159:``False``.  :mod:`optparse` supports both long and short options, allows short
174:and :mod:`optparse` will print out a brief summary of your script's options:
194::mod:`optparse` was explicitly designed to encourage the creation of programs
226:   only two option syntaxes provided by :mod:`optparse`.
243:   These option syntaxes are not supported by :mod:`optparse`, and they never
251:   :mod:`optparse`, option arguments may either be in a separate argument from
271:   interpret ``-ab``?  Because of this ambiguity, :mod:`optparse` does not
281:   "required option" is self-contradictory in English.  :mod:`optparse` doesn't
360:While :mod:`optparse` is quite flexible and powerful, it's also straightforward
362:any :mod:`optparse`\ -based program.
377:and several option attributes that tell :mod:`optparse` what to expect and what
392:*encountering an option* on the command line; in reality, :mod:`optparse`
395:Once all of your options are defined, instruct :mod:`optparse` to parse your
423:Actions tell :mod:`optparse` what to do when it encounters an option on the
424:command line.  There is a fixed set of actions hard-coded into :mod:`optparse`;
426::ref:`optparse-extending-optparse`.  Most actions tell :mod:`optparse` to store
430:If you don't specify an option action, :mod:`optparse` defaults to ``store``.
438:The most common option action is ``store``, which tells :mod:`optparse` to take
447:Now let's make up a fake command line and ask :mod:`optparse` to parse it::
452:When :mod:`optparse` sees the option string ``-f``, it consumes the next
456:Some other option types supported by :mod:`optparse` are ``int`` and ``float``.
473:If you don't specify a type, :mod:`optparse` assumes ``string``.  Combined with
479:If you don't supply a destination, :mod:`optparse` figures out a sensible
482:long option strings, :mod:`optparse` looks at the first short option string: the
485::mod:`optparse` also includes the built-in ``complex`` type.  Adding
495:seen---are quite common.  :mod:`optparse` supports them with two separate actions,
506:When :mod:`optparse` encounters ``-v`` on the command line, it sets
516:Some other actions supported by :mod:`optparse` are:
542:is usually fine, but sometimes you want more control.  :mod:`optparse` lets you
546:First, consider the verbose/quiet example.  If we want :mod:`optparse` to set
585::mod:`optparse`'s ability to generate help and usage text automatically is
606:If :mod:`optparse` encounters either ``-h`` or ``--help`` on the
623:(If the help output is triggered by a help option, :mod:`optparse` exits after
626:There's a lot going on here to help :mod:`optparse` generate the best possible
633:  :mod:`optparse` expands ``%prog`` in the usage string to the name of the
637:  If you don't supply a usage string, :mod:`optparse` uses a bland but sensible
642:  line-wrapping---\ :mod:`optparse` takes care of wrapping lines and making
652:  :mod:`optparse` converts the destination variable name to uppercase and uses
666:  string---\ :mod:`optparse` will replace it with :func:`str` of the option's
782:Similar to the brief usage string, :mod:`optparse` can also print a version
789:``version`` can contain anything you like.  When you supply it, :mod:`optparse`
818:How :mod:`optparse` handles errors
821:There are two broad classes of errors that :mod:`optparse` has to worry about:
829:no matter how stable your code is.  :mod:`optparse` can automatically detect
841:In either case, :mod:`optparse` handles the error the same way: it prints the
864::mod:`optparse`\ -generated error messages take care always to mention the
868:If :mod:`optparse`'s default error-handling behaviour does not suit your needs,
878:Here's what :mod:`optparse`\ -based scripts usually look like::
914:The first step in using :mod:`optparse` is to create an OptionParser instance.
924:      help option.  When :mod:`optparse` prints the usage string, it expands
941:      supply a true value for ``version``, :mod:`optparse` automatically adds a
952:      :mod:`optparse` reformats this paragraph to fit the current terminal width
958:      text.  :mod:`optparse` provides two concrete classes for this purpose:
962:      If true, :mod:`optparse` will add a help option (with option strings ``-h``
1000::mod:`optparse` may split Option into several classes, and :func:`make_option`
1030:   irrelevant option attributes, or fail to pass required ones, :mod:`optparse`
1033:   An option's *action* determines what :mod:`optparse` does when it encounters
1035:   :mod:`optparse` are:
1069::mod:`optparse` always creates a special object for this, conventionally called
1087:one of the first things :mod:`optparse` does is create the ``options`` object::
1102:then :mod:`optparse`, on seeing this option, will do the equivalent of ::
1127::mod:`optparse` raises :exc:`OptionError`.
1133:   Determines :mod:`optparse`'s behaviour when this option is seen on the
1150:   tells :mod:`optparse` where to write it: :attr:`~Option.dest` names an
1151:   attribute of the ``options`` object that :mod:`optparse` builds as it parses
1164:   option is seen.  If > 1, :mod:`optparse` will store a tuple of values to
1210:guide :mod:`optparse`'s behaviour; a few have required attributes, which you
1228:  If :attr:`~Option.dest` is not supplied, :mod:`optparse` derives a destination
1230:  ``foo_bar``). If there are no long option strings, :mod:`optparse` derives a
1242:  :mod:`optparse` will set ::
1262:  If ``--noisy`` is seen, :mod:`optparse` will set  ::
1285:  supplied, an empty list is automatically created when :mod:`optparse` first
1297:  If ``-t3`` is seen on the command-line, :mod:`optparse` does the equivalent
1336:  The first time ``-v`` is seen on the command line, :mod:`optparse` does the
1367:  :mod:`optparse` automatically adds a :attr:`~Option.help` option to all
1385:  If :mod:`optparse` sees either ``-h`` or ``--help`` on the command line,
1398:  After printing the help message, :mod:`optparse` terminates your process with
1408:  since :mod:`optparse` automatically adds them when needed.
1416::mod:`optparse` has five built-in option types: ``"string"``, ``"int"``,
1435:10, or 16).  If this fails, so will :mod:`optparse`, although with a more useful
1474:      instance created by :mod:`optparse`
1502:   ``-b`` are both simple options that take no arguments, :mod:`optparse`
1557:Every time you add an option, :mod:`optparse` checks for conflicts with existing
1584:At this point, :mod:`optparse` detects that a previously added option is already
1597:the command-line.  In that case, :mod:`optparse` removes that option completely,
1604:accessible, so :mod:`optparse` removes it, leaving this help text::
1679:When :mod:`optparse`'s built-in actions and types aren't quite enough for your
1680:needs, you have two choices: extend :mod:`optparse` or define a callback option.
1681:Extending :mod:`optparse` is more general, but overkill for a lot of simple
1705:case, :mod:`optparse` doesn't even know if ``-c`` takes any arguments,
1712::mod:`optparse` always passes four particular arguments to your callback, and it
1726:   instructs :mod:`optparse` to consume one argument and convert it to
1728:   though, :mod:`optparse` passes it to your callback function.
1731:   also has its usual meaning: if it is supplied and > 1, :mod:`optparse` will
1765:   is the argument to this option seen on the command-line.  :mod:`optparse` will
1790:      rest of :mod:`optparse` for storing option values; you don't need to mess
1809:problems with the option or its argument(s).  :mod:`optparse` catches this and
1909:Note that :mod:`optparse` takes care of consuming 3 arguments and converting
1920:For this case, you must write a callback, as :mod:`optparse` doesn't provide any
1922:conventional Unix command-line parsing that :mod:`optparse` normally handles for
1937:application (which is why :mod:`optparse` doesn't support this sort of thing
1973:Extending :mod:`optparse`
1976:Since the two major controlling factors in how :mod:`optparse` interprets
1986:To add new types, you need to define your own subclass of :mod:`optparse`'s
1988::mod:`optparse`'s types: :attr:`~Option.TYPES` and :attr:`~Option.TYPE_CHECKER`.
2018:than it used to be, because :mod:`optparse` 1.3 added built-in support for
2044:up modifying the :attr:`~Option.TYPE_CHECKER` attribute of :mod:`optparse`'s
2049:any other :mod:`optparse`\ -based script, except you have to instruct your
2069::mod:`optparse` has a couple of classifications for actions:
2072:   actions that result in :mod:`optparse` storing a value to an attribute of the
2104:   additionally listed here.  The only effect of this is that :mod:`optparse`
2147:* to ensure that :mod:`optparse` assigns the default type of ``"string"`` to
2152:  control back to :meth:`Option.take_action` for the standard :mod:`optparse`

Match in ./cmd.rst:
248:The :mod:`cmd` module is mainly useful for building custom shells that let a

Match in ./tkinter.font.rst:
12:The :mod:`tkinter.font` module provides the :class:`Font` class for creating

Match in ./threading.rst:
65:   :mod:`threading` module, a dummy thread object with limited functionality is
160:   Set a trace function for all threads started from the :mod:`threading` module.
166:   Set a trace function for all threads started from the :mod:`threading` module
189:   Set a profile function for all threads started from the :mod:`threading` module.
195:   Set a profile function for all threads started from the :mod:`threading` module

Match in ./zipapp.rst:
261:Using the :mod:`zipapp` module, it is possible to create self-contained Python

Match in ./os.path.rst:
39:   :mod:`os.path` module is always the path module suitable for the operating

Match in ./random.rst:
40:The :mod:`random` module also provides the :class:`SystemRandom` class which
413:   :mod:`random` module.

Match in ./email.header.rst:
31:in its :mod:`email.header` and :mod:`email.charset` modules.
37:value.  Import the :class:`Header` class from the :mod:`email.header` module.
173:The :mod:`email.header` module also provides the following convenient functions.

Match in ./http.rst:
15::mod:`http` is a package that collects several modules for working with the
25:The :mod:`http` module also defines the following enums that help you work with http related code:

Match in ./dbm.rst:
11::mod:`dbm` is a generic interface to variants of the DBM database:
101:   :mod:`dbm` backends.
161:SQLite backend for the :mod:`dbm` module.
393:   :mod:`dbm` module when a more robust module is not available. The :mod:`dbm.dumb`
401:Unlike other :mod:`dbm` backends, such as :mod:`dbm.gnu`, no

Match in ./stat.rst:
14:The :mod:`stat` module defines constants and functions for interpreting the
22:The :mod:`stat` module defines the following functions to test for specific file

Match in ./zoneinfo.rst:
16:The :mod:`zoneinfo` module provides a concrete time zone implementation to
18:default, :mod:`zoneinfo` uses the system's time zone data if available; if no

Match in ./gzip.rst:
16:The :mod:`gzip` module provides the :class:`GzipFile` class, as well as the
273:The :mod:`gzip` module provides a simple command line interface to compress or
276:Once executed the :mod:`gzip` module keeps the input file(s).

Match in ./io.rst:
27:The :mod:`io` module provides Python's main facilities for dealing with various
295:The following table summarizes the ABCs provided by the :mod:`io` module:

Match in ./urllib.request.rst:
15:The :mod:`urllib.request` module defines functions and classes which help in
34:The :mod:`urllib.request` module defines the following functions:
1476::mod:`urllib.request` Restrictions
1538:Functions defined by this module are used internally by the :mod:`urllib.request` module.

Match in ./struct.rst:
39:Several :mod:`struct` functions (and methods of :class:`Struct`) take a *buffer*
484:Two main applications for the :mod:`struct` module exist, data
576:The :mod:`struct` module also defines the following type:

Match in ./pyexpat.rst:
21:   The :mod:`pyexpat` module is not secure against maliciously
38:This module uses the :mod:`pyexpat` module to provide access to the Expat
39:parser.  Direct use of the :mod:`pyexpat` module is deprecated.
107:   Due to limitations in the ``Expat`` library used by :mod:`pyexpat`,

Match in ./weakref.rst:
3::mod:`weakref` --- Weak references
18:The :mod:`weakref` module allows the Python programmer to create :dfn:`weak
42:the :mod:`weakref` module are an alternative, using weak references to construct
66:exposed by the :mod:`weakref` module for the benefit of advanced uses.

Match in ./email.rst:
15:The :mod:`email` package is a library for managing email messages.  It is
18::mod:`smtplib`.  The :mod:`email` package attempts to be as
71:The following sections describe the functionality of the :mod:`email` package.
105:Contents of the :mod:`email` package documentation:

Match in ./ast.rst:
18:The :mod:`ast` module helps Python applications to process trees of the Python
49:   module and re-exported in :mod:`ast`.
2125::mod:`ast` Helpers
2128:Apart from the node classes, the :mod:`ast` module defines these utility functions
2504:The :mod:`ast` module can be executed as a script from the command line.

Match in ./xml.dom.pulldom.rst:
13:The :mod:`xml.dom.pulldom` module provides a "pull parser" which can also be
24:   The :mod:`xml.dom.pulldom` module is not secure against

Match in ./copyreg.rst:
15:The :mod:`copyreg` module offers a way to define functions used while pickling

Match in ./logging.rst:
1528:The :func:`captureWarnings` function can be used to integrate :mod:`logging`
1559:      This is the original source for the :mod:`logging` package.  The version of the
1561:      and 2.2.x, which do not include the :mod:`logging` package in the standard

Match in ./textwrap.rst:
14:The :mod:`textwrap` module provides some convenience functions,

Match in ./warnings.rst:
204:interpretation in :data:`sys.warnoptions`; the :mod:`warnings` module parses these
610:    module returned when you import :mod:`warnings` whose filter will be
611:    protected. This argument exists primarily for testing the :mod:`warnings`
648::mod:`warnings` module.  This is not safe if used within a concurrent program

Match in ./email.parser.rst:
128:The :class:`BytesParser` class, imported from the :mod:`email.parser` module,
131::mod:`email.parser` module also provides :class:`Parser` for parsing strings,

Match in ./turtle.rst:
2::mod:`turtle` --- Turtle graphics
2219:   Mode "standard" is compatible with old :mod:`turtle`.  Mode "logo" is
2660:If you (or your students) want to use :mod:`turtle` with online help in your
2723:  present on the import path, e.g. in the same directory as :mod:`turtle`).
2732:There can be a :file:`turtle.cfg` file in the directory where :mod:`turtle` is
2760:- Multiple scripts demonstrating different features of the :mod:`turtle`

Match in ./tkinter.dnd.rst:
15:The :mod:`tkinter.dnd` module provides drag-and-drop support for objects within

Match in ./bz2.rst:
19:The :mod:`bz2` module contains:
318:Below are some examples of typical usage of the :mod:`bz2` module.

Match in ./contextlib.rst:
671:the tools provided by :mod:`contextlib`.

Match in ./string.rst:
90::pep:`3101`.  The :class:`Formatter` class in the :mod:`string` module allows
823:The :mod:`string` module provides a :class:`Template` class that implements

Match in ./pprint.rst:
14:The :mod:`pprint` module provides a capability to "pretty-print" arbitrary

Match in ./sysconfig.rst:
19:The :mod:`sysconfig` module provides access to Python's configuration
31::mod:`sysconfig` puts all variables found in these files in a dictionary that
71:the installation options.  These schemes are stored in :mod:`sysconfig` under
261::mod:`sysconfig` provides some functions to determine these installation paths.
266:   :mod:`sysconfig`.
288:   can be passed to :mod:`sysconfig` functions that take a *scheme* argument,
316:   :mod:`sysconfig`.
326:   :mod:`sysconfig` stores installation paths corresponding to each path name,
433:Using :mod:`sysconfig` as a script
436:You can use :mod:`sysconfig` as a script with Python's *-m* option:

Match in ./tarfile.rst:
14:The :mod:`tarfile` module makes it possible to read and write tar
180:   Return :const:`True` if *name* is a tar archive file, that the :mod:`tarfile`
187:The :mod:`tarfile` module defines the following exceptions:
192:   Base class for all :mod:`tarfile` exceptions.
198:   :mod:`tarfile` module or is somehow invalid.
310::mod:`tarfile` module is able to create. See section :ref:`tar-formats` for
1229:The :mod:`tarfile` module provides a simple command-line interface to interact
1374:There are three tar formats that can be created with the :mod:`tarfile` module:
1383:  standard on GNU/Linux systems. :mod:`tarfile` fully supports the GNU tar
1428:The details of character conversion in :mod:`tarfile` are controlled by the

Match in ./argparse.rst:
16:   While :mod:`argparse` is the default recommended standard library module

Match in ./atexit.rst:
12:The :mod:`atexit` module defines functions to register and unregister cleanup
14:interpreter termination.  :mod:`atexit` runs these functions in the *reverse*
67:   of that function in the :mod:`atexit` call stack will be removed.  Equality
75:      Useful example of :mod:`atexit` to read and write :mod:`readline` history
81::mod:`atexit` Example

Match in ./os.rst:
28:  through the :mod:`os` module, but using them is of course a threat to
37:* On WebAssembly platforms, Android and iOS, large parts of the :mod:`os` module are
191:   This mapping is captured the first time the :mod:`os` module is imported,
1285:   the :mod:`os` module.  In particular, on Windows adding
2008:  Normally the *path* argument provided to functions in the :mod:`os` module
3418:   A :class:`set` object indicating which functions in the :mod:`os`
3463:   :mod:`os` module permit specifying their *path* parameter as an open file
3482:   A :class:`set` object indicating which functions in the :mod:`os` module

Match in ./select.rst:
21:   multiplexing, built upon the :mod:`select` module primitives. Users are

Match in ./trace.rst:
11:The :mod:`trace` module allows you to trace program execution, generate
27:The :mod:`trace` module can be invoked from the command line.  It can be as
52::mod:`trace`.  The :option:`--listfuncs <-l>` option is mutually exclusive with

Match in ./fractions.rst:
14:The :mod:`fractions` module provides support for rational number arithmetic.

Match in ./email.generator.rst:
235:The :mod:`email.generator` module also provides a derived class,

Match in ./multiprocessing.rst:
16::mod:`multiprocessing` is a package that supports spawning processes using an
17:API similar to the :mod:`threading` module.  The :mod:`multiprocessing` package
21:to this, the :mod:`multiprocessing` module allows the programmer to fully
25:The :mod:`multiprocessing` module also introduces APIs which do not have
61:In :mod:`multiprocessing`, processes are spawned by creating a :class:`Process`
107:Depending on the platform, :mod:`multiprocessing` supports three ways
251::mod:`multiprocessing` supports two types of communication channel between
306::mod:`multiprocessing` contains equivalents of all the synchronization
337::mod:`multiprocessing` provides a couple of ways of doing so.
511:The :mod:`multiprocessing` package mostly replicates the API of the
649:      When :mod:`multiprocessing` is initialized the main process is assigned a
750:   The base class of all :mod:`multiprocessing` exceptions.
790:One difference from other Python queue implementations, is that :mod:`multiprocessing`
800:   :mod:`multiprocessing` uses the usual :exc:`queue.Empty` and
802:   the :mod:`multiprocessing` namespace so you need to import them from
1083:   Add support for when a program which uses :mod:`multiprocessing` has been
1119:   :mod:`multiprocessing` module.
1199:   :mod:`multiprocessing` contains no analogues of
1381:   object from :mod:`multiprocessing`.
2193:   The proxy types in :mod:`multiprocessing` do nothing to support comparisons
2787:   Returns the logger used by :mod:`multiprocessing`.  If necessary, a new one
2831::mod:`multiprocessing.dummy` replicates the API of :mod:`multiprocessing` but is
2881::mod:`multiprocessing`.
2922:    from :mod:`multiprocessing` need to be picklable so that child
3012:    :mod:`multiprocessing` originally unconditionally called::

Match in ./typing.rst:
2::mod:`typing` --- Support for type hints
39:they can also be more complex. The :mod:`typing` module provides a vocabulary of

Match in ./pickletools.rst:
18::mod:`pickletools` module relevant.

Match in ./linecache.rst:
13:The :mod:`linecache` module allows one to get any line from a Python source file, while
22:The :mod:`linecache` module defines the following functions:

Match in ./http.server.rst:
22:    :mod:`http.server` is not recommended for production. It only implements
516::mod:`http.server` can also be invoked directly using the :option:`-m`
576:      :mod:`http.server` command line ``--cgi`` support is being removed

Match in ./poplib.rst:
33:The :mod:`poplib` module provides two classes:
89:One exception is defined as an attribute of the :mod:`poplib` module:

Match in ./xml.dom.minidom.rst:
15::mod:`xml.dom.minidom` is a minimal implementation of the Document Object
24:   The :mod:`xml.dom.minidom` module is not secure against
30::mod:`xml.dom.minidom`, this is done through the parse functions::
74::mod:`xml.dom.minidom` module.  Once you have a :class:`Document`, you
97:objects.  :meth:`unlink` is an :mod:`xml.dom.minidom`\ -specific
105:      The W3C recommendation for the DOM supported by :mod:`xml.dom.minidom`.
115::mod:`xml.dom.minidom`.
218:The :mod:`xml.dom.minidom` module is essentially a DOM 1.0-compatible DOM with
241:* The type ``DOMString`` maps to Python strings. :mod:`xml.dom.minidom` supports
249:* ``DOMException`` is currently not supported in :mod:`xml.dom.minidom`.
250:  Instead, :mod:`xml.dom.minidom` uses standard Python exceptions such as
259:The following interfaces have no implementation in :mod:`xml.dom.minidom`:

Match in ./sys.monitoring.rst:
13:    :mod:`sys.monitoring` is a namespace within the :mod:`sys` module,
23:monitor execution. The :mod:`sys.monitoring` namespace provides means to

Match in ./doctest.rst:
16:The :mod:`doctest` module searches for pieces of text that look like interactive
88:If you run :file:`example.py` directly from the command line, :mod:`doctest`
97:``-v`` to the script, and :mod:`doctest` prints a detailed log of what
133:That's all you need to know to start making productive use of :mod:`doctest`!
255:The :mod:`doctest` module can be invoked as a script from the command line:
439:By default, each time :mod:`doctest` finds a docstring to test, it uses a
719:useful unless you intend to extend :mod:`doctest` internals via subclassing:
822::mod:`doctest` is serious about requiring exact matches in expected output.  If
1024:their doctests systematically.  :mod:`doctest` provides two functions that can
1161::mod:`doctest` functions yourself, you can control the :mod:`doctest` options in
1162:use directly, by passing option flags to :mod:`doctest` functions.  However, if
1165::mod:`doctest` reporting options (perhaps, e.g., specified by command line
1167::mod:`doctest` test runners.
1169:For this reason, :mod:`doctest` also supports a notion of :mod:`doctest`
1175:   Set the :mod:`doctest` reporting flags to use.
1892:As mentioned in the introduction, :mod:`doctest` has grown to have three primary
1910:by and things change.  I'm still amazed at how often one of my :mod:`doctest`

Match in ./configparser.rst:
83::mod:`configparser` classes can read and write such files.  Let's start by
452:custom objects as if they were dictionaries.  In case of :mod:`configparser`,
462::mod:`configparser` objects behave as close to actual dictionaries as possible.
510::mod:`configparser` goes a long way to provide support for the largest sensible
563:  which otherwise conform to the syntax supported by :mod:`configparser`.  The
618:     In previous versions of :mod:`configparser` behaviour matched
675:     In previous versions of :mod:`configparser` behaviour matched
845:Mainly because of backwards compatibility concerns, :mod:`configparser`
1381:   Base class for all other :mod:`configparser` exceptions.

Match in ./test.rst:
10:   The :mod:`test` package is meant for internal use by Python only. It is
18:The :mod:`test` package contains all regression tests for Python as well as the
23:Each module in the :mod:`test` package whose name starts with ``test_`` is a
41:Writing Unit Tests for the :mod:`test` package
165:The :mod:`test` package can be run as a script to drive Python's regression
170::mod:`test` package. It does this by finding all modules in the package whose
178:Running :mod:`test` directly allows what resources are available for
185:will run :mod:`test` with all resources except the ``audio`` and

Match in ./graphlib.rst:
207:The :mod:`graphlib` module defines the following exception classes:

Match in ./xml.dom.rst:
83:The :mod:`xml.dom` contains the following functions:
138:In addition, :mod:`xml.dom` contains a base :class:`Node` class and the DOM

Match in ./urllib.error.rst:
14:The :mod:`urllib.error` module defines the exception classes for exceptions
17:The following exceptions are raised by :mod:`urllib.error` as appropriate:

Match in ./cmath.rst:
127:   separate :mod:`cmath` module function for this operation.
360:number. Also note that the functions defined in :mod:`cmath` always return a

Match in ./smtplib.rst:
17:The :mod:`smtplib` module defines an SMTP client session object that can be used
330:   Each of the authentication methods supported by :mod:`smtplib` are tried in
382:   directly by :mod:`smtplib`.

Match in ./xmlrpc.client.rst:
26:   The :mod:`xmlrpc.client` module is not secure against maliciously
32:   For HTTPS URIs, :mod:`xmlrpc.client` now performs all the necessary

Match in ./re.rst:
52:   which has an API compatible with the standard library :mod:`re` module,

Match in ./bdb.rst:
11:The :mod:`bdb` module handles basic debugger functions, like setting breakpoints
21:The :mod:`bdb` module also defines two classes:

Match in ./curses.panel.rst:
21:The module :mod:`curses.panel` defines the following functions:

Match in ./email.iterators.rst:
13::mod:`email.iterators` module provides some useful higher level iterations over

Match in ./pickle.rst:
22:The :mod:`pickle` module implements binary protocols for serializing and
53:general :mod:`pickle` should always be the preferred way to serialize Python
57:The :mod:`pickle` module differs from :mod:`marshal` in several significant ways:
59:* The :mod:`pickle` module keeps track of the objects it has already serialized,
68:  serialized.  :mod:`pickle` stores such objects only once, and ensures that all
73:  instances.  :mod:`pickle` can save and restore class instances transparently,
81:  The :mod:`pickle` serialization format is guaranteed to be backwards compatible
126:The data format used by :mod:`pickle` is Python-specific.  This has the
131:By default, the :mod:`pickle` data format uses a relatively compact binary
136:generated by :mod:`pickle`.  :mod:`pickletools` source code has extensive
170:   :mod:`pickle` reads and writes file objects, it does not handle the issue of
172:   access to persistent objects.  The :mod:`pickle` module can transform a complex
189:The :mod:`pickle` module provides the following constants:
220:The :mod:`pickle` module provides the following functions to make the pickling
278:The :mod:`pickle` module defines three exceptions:
303:The :mod:`pickle` module exports three classes, :class:`Pickler`,
776:For the benefit of object persistence, the :mod:`pickle` module supports the
782:The resolution of such persistent IDs is not defined by the :mod:`pickle`
976:In some contexts, the :mod:`pickle` module is used to transfer massive amounts
979:operation of the :mod:`pickle` module, as it transforms a graph-like structure
998:with normal usage of the :mod:`pickle` module.  However, consumers can also
999:opt-in to tell :mod:`pickle` that they will handle those buffers by
1175:Also, the :mod:`pickle` module has a transparent optimizer written in C.
1218:The :mod:`pickle` module can be invoked as a script from the command line,
1246:      Indexed databases of objects; uses :mod:`pickle`.

Match in ./operator.rst:
18:The :mod:`operator` module exports a set of efficient functions corresponding to
278:The :mod:`operator` module also defines tools for generalized attribute and item
393:Python syntax and the functions in the :mod:`operator` module.

Match in ./ctypes.rst:
13::mod:`ctypes` is a foreign function library for Python.  It provides C compatible
37::mod:`ctypes` exports the *cdll*, and on Windows *windll* and *oledll*
183:On Windows, :mod:`ctypes` uses win32 structured exception handling to prevent
193:There are, however, enough ways to crash Python with :mod:`ctypes`, so you
206:more about :mod:`ctypes` data types.
214::mod:`ctypes` defines a number of primitive C compatible data types:
382:bytes objects have to be wrapped in their corresponding :mod:`ctypes` type, so
416:You can also customize :mod:`ctypes` argument conversion to allow instances of
417:your own classes be used as function arguments. :mod:`ctypes` looks for an
419:attribute must be an integer, string, bytes, a :mod:`ctypes` instance, or an
475:integer, string, bytes, a :mod:`ctypes` instance, or an object with an
585::mod:`ctypes` exports the :func:`byref` function which is used to pass parameters
610:base classes which are defined in the :mod:`ctypes` module. Each subclass must
614:The field type must be a :mod:`ctypes` type like :class:`c_int`, or any other
615:derived :mod:`ctypes` type: structure, union, array, pointer.
674:   :mod:`ctypes` does not support passing unions or structures with bit-fields
696::mod:`ctypes` uses the native byte order for Structures and Unions.  To build
779::mod:`ctypes` type::
793:Note that :mod:`ctypes` does not have OOR (original object return), it constructs a
837::func:`POINTER` function, which accepts any :mod:`ctypes` type, and returns a
859::mod:`ctypes` checks for ``NULL`` when dereferencing pointers (but dereferencing
944:into another type.  :mod:`ctypes` provides a :func:`cast` function which can be
1008:In :mod:`ctypes`, we can define the ``cell`` class and set the
1042::mod:`ctypes` allows creating C callable function pointers from Python callables.
1141:   are used from C code. :mod:`ctypes` doesn't, and if you don't, they may be
1160::mod:`ctypes` can access values like this with the :meth:`~_CData.in_dll` class methods of
1179:size, we show only how this table can be read with :mod:`ctypes`::
1225:There are some edges in :mod:`ctypes` where you might expect something other
1293::mod:`ctypes` provides some support for variable-sized arrays and structures.
1327:Another way to use variable-sized data types with :mod:`ctypes` is to use the
1405:If wrapping a shared library with :mod:`ctypes`, it *may* be better to determine
1531::mod:`ctypes` maintains a thread-local copy of the system's :data:`errno`
1909:Here is the wrapping with :mod:`ctypes`::
1932:Here is the wrapping with :mod:`ctypes`::
1960:unchanged, :mod:`ctypes` continues the normal processing it does on the output
2388:      a new object is returned each time.  :mod:`ctypes` does *not* implement
2687:   types, and at least define a :attr:`_fields_` class variable. :mod:`ctypes` will
2778:      :mod:`ctypes` will create descriptors in the structure type that allows
2922:   :mod:`ctypes` data type with a non-negative integer.  Alternatively, you can subclass
2948:   :mod:`ctypes` data type and *length* an integer.

Match in ./symtable.rst:
17:identifier in the code.  :mod:`symtable` provides an interface to examine these
358:The :mod:`symtable` module can be executed as a script from the command line.

Match in ./site.rst:
54:   :mod:`site` is no longer responsible for updating :data:`sys.prefix` and
58:   :data:`sys.exec_prefix` no longer depend on the :mod:`site` initialization,
278:The :mod:`site` module also provides a way to get the user directories from the

Match in ./curses.ascii.rst:
14:The :mod:`curses.ascii` module supplies name constants for ASCII characters and

Match in ./pathlib.rst:
1889::mod:`os` and :mod:`os.path`            :mod:`pathlib`

Match in ./json.rst:
26::mod:`json` exposes an API familiar to users of the standard library
119:Using :mod:`json` from the shell to validate and pretty-print:
741:The :mod:`json` module can be invoked as a script via ``python -m json``
763:   The :mod:`json` module may now be directly executed as

Match in ./tracemalloc.rst:
310:   Return a :class:`Traceback` instance, or ``None`` if the :mod:`tracemalloc`
321:   The :mod:`tracemalloc` module must be tracing memory allocations to
330:   :mod:`tracemalloc` module as a tuple: ``(current: int, peak: int)``.
335:   Set the peak size of memory blocks traced by the :mod:`tracemalloc` module
338:   Do nothing if the :mod:`tracemalloc` module is not tracing memory
353:   Get the memory usage in bytes of the :mod:`tracemalloc` module used to store
360:    ``True`` if the :mod:`tracemalloc` module is tracing Python memory
381:   :mod:`tracemalloc` module. Use the :func:`get_tracemalloc_memory` function
382:   to measure how much memory is used by the :mod:`tracemalloc` module.
411:   :mod:`tracemalloc` module started to trace memory allocations.
416:   The :mod:`tracemalloc` module must be tracing memory allocations to take a
460:     :mod:`tracemalloc` module

Match in ./posix.rst:
20:module provides a superset of the :mod:`posix` interface.  On non-Unix operating
21:systems the :mod:`posix` module is not available, but a subset is always
23:*no* performance penalty in using it instead of :mod:`posix`.  In addition,
70::mod:`posix` defines the following data item:
94:      :mod:`posix` module.

Match in ./unittest.rst:
19:The :mod:`unittest` unit testing framework was originally inspired by JUnit
25:To achieve this, :mod:`unittest` supports some important concepts in an
36:   response to a particular set of inputs.  :mod:`unittest` provides a base class,
56:      by :mod:`unittest`.
84:The :mod:`unittest` module provides a rich set of tools for constructing and
150:The above examples show the most commonly used :mod:`unittest` features which
368:scenarios that must be set up and checked for correctness.  In :mod:`unittest`,
390:exception will be raised with an explanatory message, and :mod:`unittest`
445:according to the features they test.  :mod:`unittest` provides a mechanism for
446:this: the :dfn:`test suite`, represented by :mod:`unittest`'s
492:run from :mod:`unittest`, without converting every old test function to a
495:For this reason, :mod:`unittest` provides a :class:`FunctionTestCase` class.
516:   existing test base over to a :mod:`unittest`\ -based system, this approach is
712:This section describes in depth the API of :mod:`unittest`.
723:   in the :mod:`unittest` universe.  This class is intended to be used as a base
1730:   :mod:`unittest`-based test framework.
1825:   :mod:`unittest` module provides an instance that can be shared as
2051:   Testing frameworks built on top of :mod:`unittest` may want access to the

Match in ./subprocess.rst:
14:The :mod:`subprocess` module allows you to spawn new processes, connect to their
21:Information about how the :mod:`subprocess` module can be used to replace these
30:Using the :mod:`subprocess` Module
1037:The :mod:`subprocess` module exposes the following constants.
1326:Replacing Older Functions with the :mod:`subprocess` Module
1343:been imported from the :mod:`subprocess` module.
1403:  using the :mod:`subprocess` module.
1569:On Linux, :mod:`subprocess` defaults to using the ``vfork()`` system call

Match in ./decimal.rst:
33:The :mod:`decimal` module provides support for fast correctly rounded
270:In accordance with the standard, the :mod:`decimal` module provides two ready to
1798:The :mod:`decimal` module makes it possible to restore the identities by
1820:The number system for the :mod:`decimal` module provides special values

Match in ./wsgiref.rst:
24::mod:`wsgiref` is a reference implementation of the WSGI specification that can

Match in ./sched.rst:
15:The :mod:`sched` module defines a class which implements a general purpose event

Match in ./stringprep.rst:
29:The module :mod:`stringprep` only exposes the tables from :rfc:`3454`. As these
36::mod:`stringprep` provides the "characteristic function", i.e. a function that

Match in ./winsound.rst:
13:The :mod:`winsound` module provides access to the basic sound-playing machinery

Match in ./tempfile.rst:
388:Here are some examples of typical usage of the :mod:`tempfile` module::

Match in ./zipfile.rst:
75:   methods of :class:`ZipFile` objects.  Most users of the :mod:`zipfile` module
187:   ``false`` :mod:`zipfile` will raise an exception when the ZIP file would
927:The :mod:`zipfile` module provides a simple command-line interface to interact

Is it realistic to do this? Maybe this should be done as part of other prs?

@AA-Turner
Copy link
Member

I agree with Stan, a module linking to itself is a bit odd but really harmless, whereas changing everything will be needless churn.

@Yzi-Li thank you for opening the issue, but I would suggest you work on something else instead.

A

@AA-Turner AA-Turner closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
Status: Todo
Development

No branches or pull requests

3 participants