bpo-35054: Add yet more index entries for symbols. (GH-10121)
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index fdbbba1..fd7df4c 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -130,8 +130,7 @@
.. index::
single: parenthesized form
- single: (; tuple display
- single: ); tuple display
+ single: () (parentheses); tuple display
A parenthesized form is an optional expression list enclosed in parentheses:
@@ -151,7 +150,7 @@
.. index::
single: comma; tuple display
pair: tuple; display
- single: ,; tuple display
+ single: , (comma); tuple display
Note that tuples are not formed by the parentheses, but rather by use of the
comma operator. The exception is the empty tuple, for which parentheses *are*
@@ -239,9 +238,8 @@
pair: list; comprehensions
pair: empty; list
object: list
- single: [; list expression
- single: ]; list expression
- single: ,; expression list
+ single: [] (square brackets); list expression
+ single: , (comma); expression list
A list display is a possibly empty series of expressions enclosed in square
brackets:
@@ -264,9 +262,8 @@
.. index::
pair: set; display
object: set
- single: {; set expression
- single: }; set expression
- single: ,; expression list
+ single: {} (curly brackets); set expression
+ single: , (comma); expression list
A set display is denoted by curly braces and distinguishable from dictionary
displays by the lack of colons separating keys and values:
@@ -293,10 +290,9 @@
pair: dictionary; display
key, datum, key/datum pair
object: dictionary
- single: {; dictionary expression
- single: }; dictionary expression
- single: :; in dictionary expressions
- single: ,; in dictionary displays
+ single: {} (curly brackets); dictionary expression
+ single: : (colon); in dictionary expressions
+ single: , (comma); in dictionary displays
A dictionary display is a possibly empty series of key/datum pairs enclosed in
curly braces:
@@ -350,8 +346,7 @@
.. index::
pair: generator; expression
object: generator
- single: (; generator expression
- single: ); generator expression
+ single: () (parentheses); generator expression
A generator expression is a compact generator notation in parentheses:
@@ -753,7 +748,7 @@
.. index::
pair: attribute; reference
- single: .; attribute reference
+ single: . (dot); attribute reference
An attribute reference is a primary followed by a period and a name:
@@ -781,8 +776,7 @@
.. index::
single: subscription
- single: [; subscription
- single: ]; subscription
+ single: [] (square brackets); subscription
.. index::
object: sequence
@@ -839,8 +833,8 @@
.. index::
single: slicing
single: slice
- single: :; slicing
- single: ,; slicing
+ single: : (colon); slicing
+ single: , (comma); slicing
.. index::
object: sequence
@@ -890,10 +884,9 @@
object: callable
single: call
single: argument; call semantics
- single: (; call
- single: ); call
- single: ,; argument list
- single: =; in function calls
+ single: () (parentheses); call
+ single: , (comma); argument list
+ single: = (equals); in function calls
.. _calls:
@@ -970,7 +963,7 @@
there were no excess keyword arguments.
.. index::
- single: *; in function calls
+ single: * (asterisk); in function calls
single: unpacking; in function calls
If the syntax ``*expression`` appears in the function call, ``expression`` must
@@ -1142,21 +1135,21 @@
.. index::
single: negation
single: minus
- single: operator; -
- single: -; unary operator
+ single: operator; - (minus)
+ single: - (minus); unary operator
The unary ``-`` (minus) operator yields the negation of its numeric argument.
.. index::
single: plus
- single: operator; +
- single: +; unary operator
+ single: operator; + (plus)
+ single: + (plus); unary operator
The unary ``+`` (plus) operator yields its numeric argument unchanged.
.. index::
single: inversion
- operator: ~
+ operator: ~ (tilde)
The unary ``~`` (invert) operator yields the bitwise inversion of its integer
argument. The bitwise inversion of ``x`` is defined as ``-(x+1)``. It only
@@ -1188,7 +1181,7 @@
.. index::
single: multiplication
- operator: *
+ operator: * (asterisk)
The ``*`` (multiplication) operator yields the product of its arguments. The
arguments must either both be numbers, or one argument must be an integer and
@@ -1198,7 +1191,7 @@
.. index::
single: matrix multiplication
- operator: @
+ operator: @ (at)
The ``@`` (at) operator is intended to be used for matrix multiplication. No
builtin Python types implement this operator.
@@ -1208,7 +1201,7 @@
.. index::
exception: ZeroDivisionError
single: division
- operator: /
+ operator: / (slash)
operator: //
The ``/`` (division) and ``//`` (floor division) operators yield the quotient of
@@ -1220,7 +1213,7 @@
.. index::
single: modulo
- operator: %
+ operator: % (percent)
The ``%`` (modulo) operator yields the remainder from the division of the first
argument by the second. The numeric arguments are first converted to a common
@@ -1247,8 +1240,8 @@
.. index::
single: addition
- single: operator; +
- single: +; binary operator
+ single: operator; + (plus)
+ single: + (plus); binary operator
The ``+`` (addition) operator yields the sum of its arguments. The arguments
must either both be numbers or both be sequences of the same type. In the
@@ -1257,8 +1250,8 @@
.. index::
single: subtraction
- single: operator; -
- single: -; binary operator
+ single: operator; - (minus)
+ single: - (minus); binary operator
The ``-`` (subtraction) operator yields the difference of its arguments. The
numeric arguments are first converted to a common type.
@@ -1304,7 +1297,7 @@
.. index::
pair: bitwise; and
- operator: &
+ operator: & (ampersand)
The ``&`` operator yields the bitwise AND of its arguments, which must be
integers.
@@ -1312,7 +1305,7 @@
.. index::
pair: bitwise; xor
pair: exclusive; or
- operator: ^
+ operator: ^ (caret)
The ``^`` operator yields the bitwise XOR (exclusive OR) of its arguments, which
must be integers.
@@ -1320,7 +1313,7 @@
.. index::
pair: bitwise; or
pair: inclusive; or
- operator: |
+ operator: | (vertical bar)
The ``|`` operator yields the bitwise (inclusive) OR of its arguments, which
must be integers.
@@ -1334,8 +1327,8 @@
.. index::
single: comparison
pair: C; language
- operator: <
- operator: >
+ operator: < (less)
+ operator: > (greater)
operator: <=
operator: >=
operator: ==
@@ -1685,7 +1678,7 @@
pair: lambda; expression
pair: lambda; form
pair: anonymous; function
- single: :; lambda expression
+ single: : (colon); lambda expression
.. productionlist::
lambda_expr: "lambda" [`parameter_list`] ":" `expression`
@@ -1712,8 +1705,7 @@
.. index::
pair: expression; list
- single: comma; expression list
- single: ,; expression list
+ single: , (comma); expression list
.. productionlist::
expression_list: `expression` ("," `expression`)* [","]
@@ -1730,7 +1722,7 @@
.. index::
pair: iterable; unpacking
- single: *; in expression lists
+ single: * (asterisk); in expression lists
An asterisk ``*`` denotes :dfn:`iterable unpacking`. Its operand must be
an :term:`iterable`. The iterable is expanded into a sequence of items,