Skip to content

bpo-35054: Add yet more index entries for symbols. #10121

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

Merged
merged 1 commit into from
Oct 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Doc/library/argparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,8 @@ values are:
Note that ``nargs=1`` produces a list of one item. This is different from
the default, in which the item is produced by itself.

.. index:: single: ? (question mark); in argparse module

* ``'?'``. One argument will be consumed from the command line if possible, and
produced as a single item. If no command-line argument is present, the value from
default_ will be produced. Note that for optional arguments, there is an
Expand Down Expand Up @@ -876,6 +878,8 @@ values are:
Namespace(infile=<_io.TextIOWrapper name='<stdin>' encoding='UTF-8'>,
outfile=<_io.TextIOWrapper name='<stdout>' encoding='UTF-8'>)

.. index:: single: * (asterisk); in argparse module

* ``'*'``. All command-line arguments present are gathered into a list. Note that
it generally doesn't make much sense to have more than one positional argument
with ``nargs='*'``, but multiple optional arguments with ``nargs='*'`` is
Expand All @@ -888,6 +892,8 @@ values are:
>>> parser.parse_args('a b --foo x y --bar 1 2'.split())
Namespace(bar=['1', '2'], baz=['a', 'b'], foo=['x', 'y'])

.. index:: single: + (plus); in argparse module

* ``'+'``. Just like ``'*'``, all command-line args present are gathered into a
list. Additionally, an error message will be generated if there wasn't at
least one command-line argument present. For example::
Expand Down
3 changes: 3 additions & 0 deletions Doc/library/ast.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ Node classes
with alternatives (aka "sums"), the left-hand side class is abstract: only
instances of specific constructor nodes are ever created.

.. index:: single: ? (question mark); in AST grammar
.. index:: single: * (asterisk); in AST grammar

.. attribute:: _fields

Each concrete class has an attribute :attr:`_fields` which gives the names
Expand Down
4 changes: 4 additions & 0 deletions Doc/library/cmd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ A :class:`Cmd` instance has the following methods:

An end-of-file on input is passed back as the string ``'EOF'``.

.. index::
single: ? (question mark); in a command interpreter
single: ! (exclamation); in a command interpreter

An interpreter instance will recognize a command name ``foo`` if and only if it
has a method :meth:`do_foo`. As a special case, a line beginning with the
character ``'?'`` is dispatched to the method :meth:`do_help`. As another
Expand Down
8 changes: 8 additions & 0 deletions Doc/library/codecs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,14 @@ defined and implemented by all standard Python codecs:
The following error handlers are only applicable to
:term:`text encodings <text encoding>`:

.. index::
single: ? (question mark); replacement character
single: \ (backslash); escape sequence
single: \x; escape sequence
single: \u; escape sequence
single: \U; escape sequence
single: \N; escape sequence

+-------------------------+-----------------------------------------------+
| Value | Meaning |
+=========================+===============================================+
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/configparser.rst
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ On top of the core functionality, :class:`ConfigParser` supports
interpolation. This means values can be preprocessed before returning them
from ``get()`` calls.

.. index:: single: %; interpolation in configuration files
.. index:: single: % (percent); interpolation in configuration files

.. class:: BasicInterpolation()

Expand Down Expand Up @@ -325,7 +325,7 @@ from ``get()`` calls.
``%(my_dir)s/Pictures`` as the value of ``my_pictures`` and
``%(home_dir)s/lumberjack`` as the value of ``my_dir``.

.. index:: single: $; interpolation in configuration files
.. index:: single: $ (dollar); interpolation in configuration files

.. class:: ExtendedInterpolation()

Expand Down
4 changes: 4 additions & 0 deletions Doc/library/curses.ascii.rst
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ The following function takes either a single-character string or integer value;
it returns a string.


.. index::
single: ^ (caret); in curses module
single: ! (exclamation); in curses module

.. function:: unctrl(c)

Return a string representation of the ASCII character *c*. If *c* is printable,
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/datetime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,7 @@ Class attributes:


.. index::
single: %; datetime format
single: % (percent); datetime format

.. _strftime-strptime-behavior:

Expand Down
8 changes: 4 additions & 4 deletions Doc/library/doctest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ Some details you should read once, but won't need to remember:
to test a :exc:`SyntaxError` that omits the traceback header, you will need to
manually add the traceback header line to your test example.

.. index:: single: ^; caret
.. index:: single: ^ (caret); marker

* For some :exc:`SyntaxError`\ s, Python displays the character position of the
syntax error, using a ``^`` marker::
Expand Down Expand Up @@ -695,9 +695,9 @@ useful unless you intend to extend :mod:`doctest` internals via subclassing:


.. index::
single: #; in doctests
single: +; in doctests
single: -; in doctests
single: # (hash); in doctests
single: + (plus); in doctests
single: - (minus); in doctests
.. _doctest-directives:

Directives
Expand Down
7 changes: 7 additions & 0 deletions Doc/library/fnmatch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ This module provides support for Unix shell-style wildcards, which are *not* the
same as regular expressions (which are documented in the :mod:`re` module). The
special characters used in shell-style wildcards are:

.. index::
single: * (asterisk); in glob-style wildcards
single: ? (question mark); in glob-style wildcards
single: [] (square brackets); in glob-style wildcards
single: ! (exclamation); in glob-style wildcards
single: - (minus); in glob-style wildcards

+------------+------------------------------------+
| Pattern | Meaning |
+============+====================================+
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/gettext.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class-based API instead.
*domain*, which is returned.


.. index:: single: _; gettext
.. index:: single: _ (underscore); gettext
.. function:: gettext(message)

Return the localized translation of *message*, based on the current global
Expand Down
11 changes: 11 additions & 0 deletions Doc/library/glob.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@

--------------

.. index::
single: * (asterisk); in glob-style wildcards
single: ? (question mark); in glob-style wildcards
single: [] (square brackets); in glob-style wildcards
single: ! (exclamation); in glob-style wildcards
single: - (minus); in glob-style wildcards
single: . (dot); in glob-style wildcards

The :mod:`glob` module finds all the pathnames matching a specified pattern
according to the rules used by the Unix shell, although results are returned in
arbitrary order. No tilde expansion is done, but ``*``, ``?``, and character
Expand All @@ -36,6 +44,9 @@ For example, ``'[?]'`` matches the character ``'?'``.
:file:`../../Tools/\*/\*.gif`), and can contain shell-style wildcards. Broken
symlinks are included in the results (as in the shell).

.. index::
single: **; in glob-style wildcards

If *recursive* is true, the pattern "``**``" will match any files and zero or
more directories and subdirectories. If the pattern is followed by an
``os.sep``, only directories and subdirectories match.
Expand Down
6 changes: 3 additions & 3 deletions Doc/library/os.path.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ the :mod:`glob` module.)
Accepts a :term:`path-like object`.


.. index:: single: ~; home directory expansion
.. index:: single: ~ (tilde); home directory expansion

.. function:: expanduser(path)

Expand All @@ -186,8 +186,8 @@ the :mod:`glob` module.)
Accepts a :term:`path-like object`.

.. index::
single: $; environment variables expansion
single: %; environment variables expansion (Windows)
single: $ (dollar); environment variables expansion
single: % (percent); environment variables expansion (Windows)

.. function:: expandvars(path)

Expand Down
13 changes: 7 additions & 6 deletions Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4086,7 +4086,7 @@ are defined for all platforms.
Higher-level operations on pathnames are defined in the :mod:`os.path` module.


.. index:: single: .; in pathnames
.. index:: single: . (dot); in pathnames
.. data:: curdir

The constant string used by the operating system to refer to the current
Expand All @@ -4102,8 +4102,8 @@ Higher-level operations on pathnames are defined in the :mod:`os.path` module.
:mod:`os.path`.


.. index:: single: /; in pathnames
.. index:: single: \; in pathnames (Windows)
.. index:: single: / (slash); in pathnames
.. index:: single: \ (backslash); in pathnames (Windows)
.. data:: sep

The character used by the operating system to separate pathname components.
Expand All @@ -4113,7 +4113,7 @@ Higher-level operations on pathnames are defined in the :mod:`os.path` module.
useful. Also available via :mod:`os.path`.


.. index:: single: /; in pathnames
.. index:: single: / (slash); in pathnames
.. data:: altsep

An alternative character used by the operating system to separate pathname
Expand All @@ -4122,14 +4122,15 @@ Higher-level operations on pathnames are defined in the :mod:`os.path` module.
:mod:`os.path`.


.. index:: single: .; in pathnames
.. index:: single: . (dot); in pathnames
.. data:: extsep

The character which separates the base filename from the extension; for example,
the ``'.'`` in :file:`os.py`. Also available via :mod:`os.path`.


.. index:: single: :; path separator (POSIX)
.. index:: single: : (colon); path separator (POSIX)
single: ; (semicolon)
.. data:: pathsep

The character conventionally used by the operating system to separate search
Expand Down
35 changes: 16 additions & 19 deletions Doc/library/re.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,20 @@ the expression ``(?:a{6})*`` matches any multiple of six ``'a'`` characters.

The special characters are:

.. index:: single: .; in regular expressions
.. index:: single: . (dot); in regular expressions

``.``
(Dot.) In the default mode, this matches any character except a newline. If
the :const:`DOTALL` flag has been specified, this matches any character
including a newline.

.. index:: single: ^; in regular expressions
.. index:: single: ^ (caret); in regular expressions

``^``
(Caret.) Matches the start of the string, and in :const:`MULTILINE` mode also
matches immediately after each newline.

.. index:: single: $; in regular expressions
.. index:: single: $ (dollar); in regular expressions

``$``
Matches the end of the string or just before the newline at the end of the
Expand All @@ -117,21 +117,21 @@ The special characters are:
a single ``$`` in ``'foo\n'`` will find two (empty) matches: one just before
the newline, and one at the end of the string.

.. index:: single: *; in regular expressions
.. index:: single: * (asterisk); in regular expressions

``*``
Causes the resulting RE to match 0 or more repetitions of the preceding RE, as
many repetitions as are possible. ``ab*`` will match 'a', 'ab', or 'a' followed
by any number of 'b's.

.. index:: single: +; in regular expressions
.. index:: single: + (plus); in regular expressions

``+``
Causes the resulting RE to match 1 or more repetitions of the preceding RE.
``ab+`` will match 'a' followed by any non-zero number of 'b's; it will not
match just 'a'.

.. index:: single: ?; in regular expressions
.. index:: single: ? (question mark); in regular expressions

``?``
Causes the resulting RE to match 0 or 1 repetitions of the preceding RE.
Expand All @@ -152,8 +152,7 @@ The special characters are:
only ``'<a>'``.

.. index::
single: {; in regular expressions
single: }; in regular expressions
single: {} (curly brackets); in regular expressions

``{m}``
Specifies that exactly *m* copies of the previous RE should be matched; fewer
Expand All @@ -176,7 +175,7 @@ The special characters are:
6-character string ``'aaaaaa'``, ``a{3,5}`` will match 5 ``'a'`` characters,
while ``a{3,5}?`` will only match 3 characters.

.. index:: single: \; in regular expressions
.. index:: single: \ (backslash); in regular expressions

``\``
Either escapes special characters (permitting you to match characters like
Expand All @@ -192,16 +191,15 @@ The special characters are:
raw strings for all but the simplest expressions.

.. index::
single: [; in regular expressions
single: ]; in regular expressions
single: [] (square brackets); in regular expressions

``[]``
Used to indicate a set of characters. In a set:

* Characters can be listed individually, e.g. ``[amk]`` will match ``'a'``,
``'m'``, or ``'k'``.

.. index:: single: -; in regular expressions
.. index:: single: - (minus); in regular expressions

* Ranges of characters can be indicated by giving two characters and separating
them by a ``'-'``, for example ``[a-z]`` will match any lowercase ASCII letter,
Expand All @@ -214,13 +212,13 @@ The special characters are:
``[(+*)]`` will match any of the literal characters ``'('``, ``'+'``,
``'*'``, or ``')'``.

.. index:: single: \; in regular expressions
.. index:: single: \ (backslash); in regular expressions

* Character classes such as ``\w`` or ``\S`` (defined below) are also accepted
inside a set, although the characters they match depends on whether
:const:`ASCII` or :const:`LOCALE` mode is in force.

.. index:: single: ^; in regular expressions
.. index:: single: ^ (caret); in regular expressions

* Characters that are not within a range can be matched by :dfn:`complementing`
the set. If the first character of the set is ``'^'``, all the characters
Expand Down Expand Up @@ -252,7 +250,7 @@ The special characters are:
:exc:`FutureWarning` is raised if a character set contains constructs
that will change semantically in the future.

.. index:: single: |; in regular expressions
.. index:: single: | (vertical bar); in regular expressions

``|``
``A|B``, where *A* and *B* can be arbitrary REs, creates a regular expression that
Expand All @@ -266,8 +264,7 @@ The special characters are:
character class, as in ``[|]``.

.. index::
single: (; in regular expressions
single: ); in regular expressions
single: () (parentheses); in regular expressions

``(...)``
Matches whatever regular expression is inside the parentheses, and indicates the
Expand Down Expand Up @@ -433,7 +430,7 @@ If the ordinary character is not an ASCII digit or an ASCII letter, then the
resulting RE will match the second character. For example, ``\$`` matches the
character ``'$'``.

.. index:: single: \; in regular expressions
.. index:: single: \ (backslash); in regular expressions

``\number``
Matches the contents of the group of the same number. Groups are numbered
Expand Down Expand Up @@ -719,7 +716,7 @@ form.
.. data:: X
VERBOSE

.. index:: single: #; in regular expressions
.. index:: single: # (hash); in regular expressions

This flag allows you to write regular expressions that look nicer and are
more readable by allowing you to visually separate logical sections of the
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/site.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ the key "include-system-site-packages" set to anything other than "false"
searched for site-packages; otherwise they won't.

.. index::
single: #; comment
single: # (hash); comment
statement: import

A path configuration file is a file whose name has the form :file:`{name}.pth`
Expand Down
3 changes: 3 additions & 0 deletions Doc/library/sqlite3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,9 @@ Cursor Objects

A :class:`Cursor` instance has the following attributes and methods.

.. index:: single: ? (question mark); in SQL statements
.. index:: single: : (colon); in SQL statements

.. method:: execute(sql[, parameters])

Executes an SQL statement. The SQL statement may be parameterized (i. e.
Expand Down
Loading