summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/argparse.rst6
-rw-r--r--Doc/library/ast.rst3
-rw-r--r--Doc/library/cmd.rst4
-rw-r--r--Doc/library/codecs.rst8
-rw-r--r--Doc/library/configparser.rst4
-rw-r--r--Doc/library/curses.ascii.rst4
-rw-r--r--Doc/library/datetime.rst2
-rw-r--r--Doc/library/doctest.rst8
-rw-r--r--Doc/library/fnmatch.rst7
-rw-r--r--Doc/library/gettext.rst2
-rw-r--r--Doc/library/glob.rst11
-rw-r--r--Doc/library/os.path.rst6
-rw-r--r--Doc/library/os.rst13
-rw-r--r--Doc/library/re.rst35
-rw-r--r--Doc/library/site.rst2
-rw-r--r--Doc/library/sqlite3.rst3
-rw-r--r--Doc/library/stdtypes.rst60
-rw-r--r--Doc/library/string.rst32
-rw-r--r--Doc/library/struct.rst14
-rw-r--r--Doc/library/time.rst4
-rw-r--r--Doc/library/tkinter.rst2
-rw-r--r--Doc/library/traceback.rst2
-rw-r--r--Doc/library/winreg.rst2
23 files changed, 140 insertions, 94 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index 1973afc..cef197f 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -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
@@ -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
@@ -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::
diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst
index 97ce2f5..2883f3c 100644
--- a/Doc/library/ast.rst
+++ b/Doc/library/ast.rst
@@ -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
diff --git a/Doc/library/cmd.rst b/Doc/library/cmd.rst
index 3b4a8ff..d57edb7 100644
--- a/Doc/library/cmd.rst
+++ b/Doc/library/cmd.rst
@@ -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
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst
index b323ab5..65f41f6 100644
--- a/Doc/library/codecs.rst
+++ b/Doc/library/codecs.rst
@@ -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 |
+=========================+===============================================+
diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst
index 1a5417f..efafd63 100644
--- a/Doc/library/configparser.rst
+++ b/Doc/library/configparser.rst
@@ -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()
@@ -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()
diff --git a/Doc/library/curses.ascii.rst b/Doc/library/curses.ascii.rst
index 04b2a26..a69dbb2 100644
--- a/Doc/library/curses.ascii.rst
+++ b/Doc/library/curses.ascii.rst
@@ -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,
diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst
index e7a0fdb..a1a60b0 100644
--- a/Doc/library/datetime.rst
+++ b/Doc/library/datetime.rst
@@ -2000,7 +2000,7 @@ Class attributes:
.. index::
- single: %; datetime format
+ single: % (percent); datetime format
.. _strftime-strptime-behavior:
diff --git a/Doc/library/doctest.rst b/Doc/library/doctest.rst
index 9988429..e7c0033 100644
--- a/Doc/library/doctest.rst
+++ b/Doc/library/doctest.rst
@@ -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::
@@ -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
diff --git a/Doc/library/fnmatch.rst b/Doc/library/fnmatch.rst
index abf9523..ecba4aa 100644
--- a/Doc/library/fnmatch.rst
+++ b/Doc/library/fnmatch.rst
@@ -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 |
+============+====================================+
diff --git a/Doc/library/gettext.rst b/Doc/library/gettext.rst
index 0a9456a..ef315e0 100644
--- a/Doc/library/gettext.rst
+++ b/Doc/library/gettext.rst
@@ -63,7 +63,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
diff --git a/Doc/library/glob.rst b/Doc/library/glob.rst
index 25bd4b7..0db10b5 100644
--- a/Doc/library/glob.rst
+++ b/Doc/library/glob.rst
@@ -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
@@ -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.
diff --git a/Doc/library/os.path.rst b/Doc/library/os.path.rst
index 03644e2..469b262 100644
--- a/Doc/library/os.path.rst
+++ b/Doc/library/os.path.rst
@@ -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)
@@ -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)
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index b174b9d..6a9fe36 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -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
@@ -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.
@@ -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
@@ -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
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index 57d7402..31fb628 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -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
@@ -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.
@@ -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
@@ -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
@@ -192,8 +191,7 @@ 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:
@@ -201,7 +199,7 @@ The special characters are:
* 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,
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
diff --git a/Doc/library/site.rst b/Doc/library/site.rst
index e6a2980..7974e20 100644
--- a/Doc/library/site.rst
+++ b/Doc/library/site.rst
@@ -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`
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 9e3c56b..37087ac 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -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.
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 381374c..4686cec 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -123,9 +123,9 @@ Comparisons
pair: chaining; comparisons
pair: operator; comparison
operator: ==
- operator: <
+ operator: < (less)
operator: <=
- operator: >
+ operator: > (greater)
operator: >=
operator: !=
operator: is
@@ -246,16 +246,16 @@ and imaginary parts.
builtin: int
builtin: float
builtin: complex
- single: operator; +
- single: +; unary operator
- single: +; binary operator
- single: operator; -
- single: -; unary operator
- single: -; binary operator
- operator: *
- operator: /
+ single: operator; + (plus)
+ single: + (plus); unary operator
+ single: + (plus); binary operator
+ single: operator; - (minus)
+ single: - (minus); unary operator
+ single: - (minus); binary operator
+ operator: * (asterisk)
+ operator: / (slash)
operator: //
- operator: %
+ operator: % (percent)
operator: **
Python fully supports mixed arithmetic: when a binary arithmetic operator has
@@ -391,12 +391,12 @@ Bitwise Operations on Integer Types
pair: bitwise; operations
pair: shifting; operations
pair: masking; operations
- operator: |
- operator: ^
- operator: &
+ operator: | (vertical bar)
+ operator: ^ (caret)
+ operator: & (ampersand)
operator: <<
operator: >>
- operator: ~
+ operator: ~ (tilde)
Bitwise operations only make sense for integers. The result of bitwise
operations is calculated as though carried out in two's complement with an
@@ -2119,7 +2119,7 @@ expression support in the :mod:`re` module).
single: string; interpolation, printf
single: printf-style formatting
single: sprintf-style formatting
- single: %; printf-style formatting
+ single: % (percent); printf-style formatting
.. note::
@@ -2148,8 +2148,7 @@ components, which must occur in this order:
#. The ``'%'`` character, which marks the start of the specifier.
.. index::
- single: (; in printf-style formatting
- single: ); in printf-style formatting
+ single: () (parentheses); in printf-style formatting
#. Mapping key (optional), consisting of a parenthesised sequence of characters
(for example, ``(somename)``).
@@ -2157,13 +2156,13 @@ components, which must occur in this order:
#. Conversion flags (optional), which affect the result of some conversion
types.
-.. index:: single: *; in printf-style formatting
+.. index:: single: * (asterisk); in printf-style formatting
#. Minimum field width (optional). If specified as an ``'*'`` (asterisk), the
actual width is read from the next element of the tuple in *values*, and the
object to convert comes after the minimum field width and optional precision.
-.. index:: single: .; in printf-style formatting
+.. index:: single: . (dot); in printf-style formatting
#. Precision (optional), given as a ``'.'`` (dot) followed by the precision. If
specified as ``'*'`` (an asterisk), the actual precision is read from the next
@@ -2189,9 +2188,9 @@ sequential parameter list).
The conversion flag characters are:
.. index::
- single: #; in printf-style formatting
- single: -; in printf-style formatting
- single: +; in printf-style formatting
+ single: # (hash); in printf-style formatting
+ single: - (minus); in printf-style formatting
+ single: + (plus); in printf-style formatting
single: space; in printf-style formatting
+---------+---------------------------------------------------------------------+
@@ -3256,7 +3255,7 @@ place, and instead produce new objects.
single: bytearray; interpolation
single: printf-style formatting
single: sprintf-style formatting
- single: %; printf-style formatting
+ single: % (percent); printf-style formatting
.. note::
@@ -3283,8 +3282,7 @@ components, which must occur in this order:
#. The ``'%'`` character, which marks the start of the specifier.
.. index::
- single: (; in printf-style formatting
- single: ); in printf-style formatting
+ single: () (parentheses); in printf-style formatting
#. Mapping key (optional), consisting of a parenthesised sequence of characters
(for example, ``(somename)``).
@@ -3292,13 +3290,13 @@ components, which must occur in this order:
#. Conversion flags (optional), which affect the result of some conversion
types.
-.. index:: single: *; in printf-style formatting
+.. index:: single: * (asterisk); in printf-style formatting
#. Minimum field width (optional). If specified as an ``'*'`` (asterisk), the
actual width is read from the next element of the tuple in *values*, and the
object to convert comes after the minimum field width and optional precision.
-.. index:: single: .; in printf-style formatting
+.. index:: single: . (dot); in printf-style formatting
#. Precision (optional), given as a ``'.'`` (dot) followed by the precision. If
specified as ``'*'`` (an asterisk), the actual precision is read from the next
@@ -3324,9 +3322,9 @@ sequential parameter list).
The conversion flag characters are:
.. index::
- single: #; in printf-style formatting
- single: -; in printf-style formatting
- single: +; in printf-style formatting
+ single: # (hash); in printf-style formatting
+ single: - (minus); in printf-style formatting
+ single: + (plus); in printf-style formatting
single: space; in printf-style formatting
+---------+---------------------------------------------------------------------+
diff --git a/Doc/library/string.rst b/Doc/library/string.rst
index 55913f8..7ed52ab 100644
--- a/Doc/library/string.rst
+++ b/Doc/library/string.rst
@@ -193,13 +193,11 @@ related to that of :ref:`formatted string literals <f-strings>`, but
there are differences.
.. index::
- single: {; in string formatting
- single: }; in string formatting
- single: .; in string formatting
- single: [; in string formatting
- single: ]; in string formatting
- single: !; in string formatting
- single: :; in string formatting
+ single: {} (curly brackets); in string formatting
+ single: . (dot); in string formatting
+ single: [] (square brackets); in string formatting
+ single: ! (exclamation); in string formatting
+ single: : (colon); in string formatting
Format strings contain "replacement fields" surrounded by curly braces ``{}``.
Anything that is not contained in braces is considered literal text, which is
@@ -333,10 +331,10 @@ affect the :func:`format` function.
The meaning of the various alignment options is as follows:
.. index::
- single: <; in string formatting
- single: >; in string formatting
- single: =; in string formatting
- single: ^; in string formatting
+ single: < (less); in string formatting
+ single: > (greater); in string formatting
+ single: = (equals); in string formatting
+ single: ^ (caret); in string formatting
+---------+----------------------------------------------------------+
| Option | Meaning |
@@ -365,8 +363,8 @@ The *sign* option is only valid for number types, and can be one of the
following:
.. index::
- single: +; in string formatting
- single: -; in string formatting
+ single: + (plus); in string formatting
+ single: - (minus); in string formatting
single: space; in string formatting
+---------+----------------------------------------------------------+
@@ -383,7 +381,7 @@ following:
+---------+----------------------------------------------------------+
-.. index:: single: #; in string formatting
+.. index:: single: # (hash); in string formatting
The ``'#'`` option causes the "alternate form" to be used for the
conversion. The alternate form is defined differently for different
@@ -397,7 +395,7 @@ decimal-point character appears in the result of these conversions
only if a digit follows it. In addition, for ``'g'`` and ``'G'``
conversions, trailing zeros are not removed from the result.
-.. index:: single: ,; in string formatting
+.. index:: single: , (comma); in string formatting
The ``','`` option signals the use of a comma for a thousands separator.
For a locale aware separator, use the ``'n'`` integer presentation type
@@ -406,7 +404,7 @@ instead.
.. versionchanged:: 3.1
Added the ``','`` option (see also :pep:`378`).
-.. index:: single: _; in string formatting
+.. index:: single: _ (underscore); in string formatting
The ``'_'`` option signals the use of an underscore for a thousands
separator for floating point presentation types and for integer
@@ -694,7 +692,7 @@ formatting facilities in Python. As an example of a library built on template
strings for i18n, see the
`flufl.i18n <http://flufli18n.readthedocs.io/en/latest/>`_ package.
-.. index:: single: $; in template strings
+.. index:: single: $ (dollar); in template strings
Template strings support ``$``-based substitutions, using the following rules:
diff --git a/Doc/library/struct.rst b/Doc/library/struct.rst
index 9ba4047..1a0fd73 100644
--- a/Doc/library/struct.rst
+++ b/Doc/library/struct.rst
@@ -118,11 +118,11 @@ order, and properly aligned by skipping pad bytes if necessary (according to the
rules used by the C compiler).
.. index::
- single: @; in struct format strings
- single: =; in struct format strings
- single: <; in struct format strings
- single: >; in struct format strings
- single: !; in struct format strings
+ single: @ (at); in struct format strings
+ single: = (equals); in struct format strings
+ single: < (less); in struct format strings
+ single: > (greater); in struct format strings
+ single: ! (exclamation); in struct format strings
Alternatively, the first character of the format string can be used to indicate
the byte order, size and alignment of the packed data, according to the
@@ -247,6 +247,8 @@ platform-dependent.
Notes:
(1)
+ .. index:: single: ? (question mark); in struct format strings
+
The ``'?'`` conversion code corresponds to the :c:type:`_Bool` type defined by
C99. If this type is not available, it is simulated using a :c:type:`char`. In
standard mode, it is always represented by one byte.
@@ -329,6 +331,8 @@ are used. Note that for :func:`unpack`, the ``'p'`` format character consumes
``count`` bytes, but that the string returned can never contain more than 255
bytes.
+.. index:: single: ? (question mark); in struct format strings
+
For the ``'?'`` format character, the return value is either :const:`True` or
:const:`False`. When packing, the truth value of the argument object is used.
Either 0 or 1 in the native or standard bool representation will be packed, and
diff --git a/Doc/library/time.rst b/Doc/library/time.rst
index d76e089..c6a1f33 100644
--- a/Doc/library/time.rst
+++ b/Doc/library/time.rst
@@ -370,7 +370,7 @@ Functions
.. index::
- single: %; datetime format
+ single: % (percent); datetime format
.. function:: strftime(format[, t])
@@ -504,7 +504,7 @@ Functions
.. index::
- single: %; datetime format
+ single: % (percent); datetime format
.. function:: strptime(string[, format])
diff --git a/Doc/library/tkinter.rst b/Doc/library/tkinter.rst
index d9c1c35..4af4b73 100644
--- a/Doc/library/tkinter.rst
+++ b/Doc/library/tkinter.rst
@@ -262,6 +262,8 @@ To make a widget in Tk, the command is always of the form::
*classCommand*
denotes which kind of widget to make (a button, a label, a menu...)
+.. index:: single: . (dot); in Tkinter
+
*newPathname*
is the new name for this widget. All names in Tk must be unique. To help
enforce this, widgets in Tk are named with *pathnames*, just like files in a
diff --git a/Doc/library/traceback.rst b/Doc/library/traceback.rst
index a21ef8e..462a6a5 100644
--- a/Doc/library/traceback.rst
+++ b/Doc/library/traceback.rst
@@ -47,7 +47,7 @@ The module defines the following functions:
* it prints the exception *etype* and *value* after the stack trace
- .. index:: single: ^; caret
+ .. index:: single: ^ (caret); marker
* if *type(value)* is :exc:`SyntaxError` and *value* has the appropriate
format, it prints the line where the syntax error occurred with a caret
diff --git a/Doc/library/winreg.rst b/Doc/library/winreg.rst
index 99be47f..e9c0261 100644
--- a/Doc/library/winreg.rst
+++ b/Doc/library/winreg.rst
@@ -225,7 +225,7 @@ This module offers the following functions:
.. index::
- single: %; environment variables expansion (Windows)
+ single: % (percent); environment variables expansion (Windows)
.. function:: ExpandEnvironmentStrings(str)