Skip to content

Commit 913876d

Browse files
bpo-35054: Add yet more index entries for symbols. (GH-10121)
1 parent 95f68b1 commit 913876d

30 files changed

+223
-190
lines changed

Doc/library/argparse.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,8 @@ values are:
844844
Note that ``nargs=1`` produces a list of one item. This is different from
845845
the default, in which the item is produced by itself.
846846

847+
.. index:: single: ? (question mark); in argparse module
848+
847849
* ``'?'``. One argument will be consumed from the command line if possible, and
848850
produced as a single item. If no command-line argument is present, the value from
849851
default_ will be produced. Note that for optional arguments, there is an
@@ -876,6 +878,8 @@ values are:
876878
Namespace(infile=<_io.TextIOWrapper name='<stdin>' encoding='UTF-8'>,
877879
outfile=<_io.TextIOWrapper name='<stdout>' encoding='UTF-8'>)
878880

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

895+
.. index:: single: + (plus); in argparse module
896+
891897
* ``'+'``. Just like ``'*'``, all command-line args present are gathered into a
892898
list. Additionally, an error message will be generated if there wasn't at
893899
least one command-line argument present. For example::

Doc/library/ast.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ Node classes
4141
with alternatives (aka "sums"), the left-hand side class is abstract: only
4242
instances of specific constructor nodes are ever created.
4343

44+
.. index:: single: ? (question mark); in AST grammar
45+
.. index:: single: * (asterisk); in AST grammar
46+
4447
.. attribute:: _fields
4548

4649
Each concrete class has an attribute :attr:`_fields` which gives the names

Doc/library/cmd.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ A :class:`Cmd` instance has the following methods:
6161

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

64+
.. index::
65+
single: ? (question mark); in a command interpreter
66+
single: ! (exclamation); in a command interpreter
67+
6468
An interpreter instance will recognize a command name ``foo`` if and only if it
6569
has a method :meth:`do_foo`. As a special case, a line beginning with the
6670
character ``'?'`` is dispatched to the method :meth:`do_help`. As another

Doc/library/codecs.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,14 @@ defined and implemented by all standard Python codecs:
312312
The following error handlers are only applicable to
313313
:term:`text encodings <text encoding>`:
314314

315+
.. index::
316+
single: ? (question mark); replacement character
317+
single: \ (backslash); escape sequence
318+
single: \x; escape sequence
319+
single: \u; escape sequence
320+
single: \U; escape sequence
321+
single: \N; escape sequence
322+
315323
+-------------------------+-----------------------------------------------+
316324
| Value | Meaning |
317325
+=========================+===============================================+

Doc/library/configparser.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ On top of the core functionality, :class:`ConfigParser` supports
295295
interpolation. This means values can be preprocessed before returning them
296296
from ``get()`` calls.
297297

298-
.. index:: single: %; interpolation in configuration files
298+
.. index:: single: % (percent); interpolation in configuration files
299299

300300
.. class:: BasicInterpolation()
301301

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

328-
.. index:: single: $; interpolation in configuration files
328+
.. index:: single: $ (dollar); interpolation in configuration files
329329

330330
.. class:: ExtendedInterpolation()
331331

Doc/library/curses.ascii.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ The following function takes either a single-character string or integer value;
207207
it returns a string.
208208

209209

210+
.. index::
211+
single: ^ (caret); in curses module
212+
single: ! (exclamation); in curses module
213+
210214
.. function:: unctrl(c)
211215

212216
Return a string representation of the ASCII character *c*. If *c* is printable,

Doc/library/datetime.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,7 @@ Class attributes:
20002000

20012001

20022002
.. index::
2003-
single: %; datetime format
2003+
single: % (percent); datetime format
20042004

20052005
.. _strftime-strptime-behavior:
20062006

Doc/library/doctest.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ Some details you should read once, but won't need to remember:
485485
to test a :exc:`SyntaxError` that omits the traceback header, you will need to
486486
manually add the traceback header line to your test example.
487487

488-
.. index:: single: ^; caret
488+
.. index:: single: ^ (caret); marker
489489

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

696696

697697
.. index::
698-
single: #; in doctests
699-
single: +; in doctests
700-
single: -; in doctests
698+
single: # (hash); in doctests
699+
single: + (plus); in doctests
700+
single: - (minus); in doctests
701701
.. _doctest-directives:
702702

703703
Directives

Doc/library/fnmatch.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ This module provides support for Unix shell-style wildcards, which are *not* the
1616
same as regular expressions (which are documented in the :mod:`re` module). The
1717
special characters used in shell-style wildcards are:
1818

19+
.. index::
20+
single: * (asterisk); in glob-style wildcards
21+
single: ? (question mark); in glob-style wildcards
22+
single: [] (square brackets); in glob-style wildcards
23+
single: ! (exclamation); in glob-style wildcards
24+
single: - (minus); in glob-style wildcards
25+
1926
+------------+------------------------------------+
2027
| Pattern | Meaning |
2128
+============+====================================+

Doc/library/gettext.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class-based API instead.
6363
*domain*, which is returned.
6464

6565

66-
.. index:: single: _; gettext
66+
.. index:: single: _ (underscore); gettext
6767
.. function:: gettext(message)
6868

6969
Return the localized translation of *message*, based on the current global

Doc/library/glob.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010

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

13+
.. index::
14+
single: * (asterisk); in glob-style wildcards
15+
single: ? (question mark); in glob-style wildcards
16+
single: [] (square brackets); in glob-style wildcards
17+
single: ! (exclamation); in glob-style wildcards
18+
single: - (minus); in glob-style wildcards
19+
single: . (dot); in glob-style wildcards
20+
1321
The :mod:`glob` module finds all the pathnames matching a specified pattern
1422
according to the rules used by the Unix shell, although results are returned in
1523
arbitrary order. No tilde expansion is done, but ``*``, ``?``, and character
@@ -36,6 +44,9 @@ For example, ``'[?]'`` matches the character ``'?'``.
3644
:file:`../../Tools/\*/\*.gif`), and can contain shell-style wildcards. Broken
3745
symlinks are included in the results (as in the shell).
3846

47+
.. index::
48+
single: **; in glob-style wildcards
49+
3950
If *recursive* is true, the pattern "``**``" will match any files and zero or
4051
more directories and subdirectories. If the pattern is followed by an
4152
``os.sep``, only directories and subdirectories match.

Doc/library/os.path.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ the :mod:`glob` module.)
160160
Accepts a :term:`path-like object`.
161161

162162

163-
.. index:: single: ~; home directory expansion
163+
.. index:: single: ~ (tilde); home directory expansion
164164

165165
.. function:: expanduser(path)
166166

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

188188
.. index::
189-
single: $; environment variables expansion
190-
single: %; environment variables expansion (Windows)
189+
single: $ (dollar); environment variables expansion
190+
single: % (percent); environment variables expansion (Windows)
191191

192192
.. function:: expandvars(path)
193193

Doc/library/os.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4086,7 +4086,7 @@ are defined for all platforms.
40864086
Higher-level operations on pathnames are defined in the :mod:`os.path` module.
40874087

40884088

4089-
.. index:: single: .; in pathnames
4089+
.. index:: single: . (dot); in pathnames
40904090
.. data:: curdir
40914091

40924092
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.
41024102
:mod:`os.path`.
41034103

41044104

4105-
.. index:: single: /; in pathnames
4106-
.. index:: single: \; in pathnames (Windows)
4105+
.. index:: single: / (slash); in pathnames
4106+
.. index:: single: \ (backslash); in pathnames (Windows)
41074107
.. data:: sep
41084108

41094109
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.
41134113
useful. Also available via :mod:`os.path`.
41144114

41154115

4116-
.. index:: single: /; in pathnames
4116+
.. index:: single: / (slash); in pathnames
41174117
.. data:: altsep
41184118

41194119
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.
41224122
:mod:`os.path`.
41234123

41244124

4125-
.. index:: single: .; in pathnames
4125+
.. index:: single: . (dot); in pathnames
41264126
.. data:: extsep
41274127

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

41314131

4132-
.. index:: single: :; path separator (POSIX)
4132+
.. index:: single: : (colon); path separator (POSIX)
4133+
single: ; (semicolon)
41334134
.. data:: pathsep
41344135

41354136
The character conventionally used by the operating system to separate search

Doc/library/re.rst

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -93,20 +93,20 @@ the expression ``(?:a{6})*`` matches any multiple of six ``'a'`` characters.
9393

9494
The special characters are:
9595

96-
.. index:: single: .; in regular expressions
96+
.. index:: single: . (dot); in regular expressions
9797

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

103-
.. index:: single: ^; in regular expressions
103+
.. index:: single: ^ (caret); in regular expressions
104104

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

109-
.. index:: single: $; in regular expressions
109+
.. index:: single: $ (dollar); in regular expressions
110110

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

120-
.. index:: single: *; in regular expressions
120+
.. index:: single: * (asterisk); in regular expressions
121121

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

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

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

134-
.. index:: single: ?; in regular expressions
134+
.. index:: single: ? (question mark); in regular expressions
135135

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

154154
.. index::
155-
single: {; in regular expressions
156-
single: }; in regular expressions
155+
single: {} (curly brackets); in regular expressions
157156

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

179-
.. index:: single: \; in regular expressions
178+
.. index:: single: \ (backslash); in regular expressions
180179

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

194193
.. index::
195-
single: [; in regular expressions
196-
single: ]; in regular expressions
194+
single: [] (square brackets); in regular expressions
197195

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

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

204-
.. index:: single: -; in regular expressions
202+
.. index:: single: - (minus); in regular expressions
205203

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

217-
.. index:: single: \; in regular expressions
215+
.. index:: single: \ (backslash); in regular expressions
218216

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

223-
.. index:: single: ^; in regular expressions
221+
.. index:: single: ^ (caret); in regular expressions
224222

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

255-
.. index:: single: |; in regular expressions
253+
.. index:: single: | (vertical bar); in regular expressions
256254

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

268266
.. index::
269-
single: (; in regular expressions
270-
single: ); in regular expressions
267+
single: () (parentheses); in regular expressions
271268

272269
``(...)``
273270
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
433430
resulting RE will match the second character. For example, ``\$`` matches the
434431
character ``'$'``.
435432

436-
.. index:: single: \; in regular expressions
433+
.. index:: single: \ (backslash); in regular expressions
437434

438435
``\number``
439436
Matches the contents of the group of the same number. Groups are numbered
@@ -719,7 +716,7 @@ form.
719716
.. data:: X
720717
VERBOSE
721718

722-
.. index:: single: #; in regular expressions
719+
.. index:: single: # (hash); in regular expressions
723720

724721
This flag allows you to write regular expressions that look nicer and are
725722
more readable by allowing you to visually separate logical sections of the

Doc/library/site.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ the key "include-system-site-packages" set to anything other than "false"
5050
searched for site-packages; otherwise they won't.
5151

5252
.. index::
53-
single: #; comment
53+
single: # (hash); comment
5454
statement: import
5555

5656
A path configuration file is a file whose name has the form :file:`{name}.pth`

Doc/library/sqlite3.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,9 @@ Cursor Objects
598598

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

601+
.. index:: single: ? (question mark); in SQL statements
602+
.. index:: single: : (colon); in SQL statements
603+
601604
.. method:: execute(sql[, parameters])
602605

603606
Executes an SQL statement. The SQL statement may be parameterized (i. e.

0 commit comments

Comments
 (0)