@@ -1171,7 +1171,7 @@ The power operator
11711171
11721172.. index ::
11731173 pair: power; operation
1174- operator: **
1174+ pair: operator; **
11751175
11761176The power operator binds more tightly than unary operators on its left; it binds
11771177less tightly than unary operators on its right. The syntax is:
@@ -1232,7 +1232,7 @@ operation can be overridden with the :meth:`__pos__` special method.
12321232
12331233.. index ::
12341234 single: inversion
1235- operator: ~ (tilde)
1235+ pair: operator; ~ (tilde)
12361236
12371237The unary ``~ `` (invert) operator yields the bitwise inversion of its integer
12381238argument. The bitwise inversion of ``x `` is defined as ``-(x+1) ``. It only
@@ -1267,7 +1267,7 @@ operators and one for additive operators:
12671267
12681268.. index ::
12691269 single: multiplication
1270- operator: * (asterisk)
1270+ pair: operator; * (asterisk)
12711271
12721272The ``* `` (multiplication) operator yields the product of its arguments. The
12731273arguments must either both be numbers, or one argument must be an integer and
@@ -1280,7 +1280,7 @@ This operation can be customized using the special :meth:`__mul__` and
12801280
12811281.. index ::
12821282 single: matrix multiplication
1283- operator: @ (at)
1283+ pair: operator; @ (at)
12841284
12851285The ``@ `` (at) operator is intended to be used for matrix multiplication. No
12861286builtin Python types implement this operator.
@@ -1290,8 +1290,8 @@ builtin Python types implement this operator.
12901290.. index ::
12911291 exception: ZeroDivisionError
12921292 single: division
1293- operator: / (slash)
1294- operator: //
1293+ pair: operator; / (slash)
1294+ pair: operator; //
12951295
12961296The ``/ `` (division) and ``// `` (floor division) operators yield the quotient of
12971297their arguments. The numeric arguments are first converted to a common type.
@@ -1305,7 +1305,7 @@ This operation can be customized using the special :meth:`__truediv__` and
13051305
13061306.. index ::
13071307 single: modulo
1308- operator: % (percent)
1308+ pair: operator; % (percent)
13091309
13101310The ``% `` (modulo) operator yields the remainder from the division of the first
13111311argument by the second. The numeric arguments are first converted to a common
@@ -1363,8 +1363,8 @@ Shifting operations
13631363
13641364.. index ::
13651365 pair: shifting; operation
1366- operator: <<
1367- operator: >>
1366+ pair: operator; <<
1367+ pair: operator; >>
13681368
13691369The shifting operations have lower priority than the arithmetic operations:
13701370
@@ -1399,7 +1399,7 @@ Each of the three bitwise operations has a different priority level:
13991399
14001400.. index ::
14011401 pair: bitwise; and
1402- operator: & (ampersand)
1402+ pair: operator; & (ampersand)
14031403
14041404The ``& `` operator yields the bitwise AND of its arguments, which must be
14051405integers or one of them must be a custom object overriding :meth: `__and__ ` or
@@ -1408,7 +1408,7 @@ integers or one of them must be a custom object overriding :meth:`__and__` or
14081408.. index ::
14091409 pair: bitwise; xor
14101410 pair: exclusive; or
1411- operator: ^ (caret)
1411+ pair: operator; ^ (caret)
14121412
14131413The ``^ `` operator yields the bitwise XOR (exclusive OR) of its arguments, which
14141414must be integers or one of them must be a custom object overriding :meth: `__xor__ ` or
@@ -1417,7 +1417,7 @@ must be integers or one of them must be a custom object overriding :meth:`__xor_
14171417.. index ::
14181418 pair: bitwise; or
14191419 pair: inclusive; or
1420- operator: | (vertical bar)
1420+ pair: operator; | (vertical bar)
14211421
14221422The ``| `` operator yields the bitwise (inclusive) OR of its arguments, which
14231423must be integers or one of them must be a custom object overriding :meth: `__or__ ` or
@@ -1432,12 +1432,12 @@ Comparisons
14321432.. index ::
14331433 single: comparison
14341434 pair: C; language
1435- operator: < (less)
1436- operator: > (greater)
1437- operator: <=
1438- operator: >=
1439- operator: ==
1440- operator: !=
1435+ pair: operator; < (less)
1436+ pair: operator; > (greater)
1437+ pair: operator; <=
1438+ pair: operator; >=
1439+ pair: operator; ==
1440+ pair: operator; !=
14411441
14421442Unlike C, all comparison operations in Python have the same priority, which is
14431443lower than that of any arithmetic, shifting or bitwise operation. Also unlike
@@ -1669,17 +1669,17 @@ raises the :exc:`IndexError` exception. (If any other exception is raised, it i
16691669if :keyword: `in ` raised that exception).
16701670
16711671.. index ::
1672- operator: in
1673- operator: not in
1672+ pair: operator; in
1673+ pair: operator; not in
16741674 pair: membership; test
16751675 object: sequence
16761676
16771677The operator :keyword: `not in ` is defined to have the inverse truth value of
16781678:keyword: `in `.
16791679
16801680.. index ::
1681- operator: is
1682- operator: is not
1681+ pair: operator; is
1682+ pair: operator; is not
16831683 pair: identity; test
16841684
16851685
@@ -1719,17 +1719,17 @@ control flow statements, the following values are interpreted as false:
17191719other values are interpreted as true. User-defined objects can customize their
17201720truth value by providing a :meth: `__bool__ ` method.
17211721
1722- .. index :: operator: not
1722+ .. index :: pair: operator; not
17231723
17241724The operator :keyword: `not ` yields ``True `` if its argument is false, ``False ``
17251725otherwise.
17261726
1727- .. index :: operator: and
1727+ .. index :: pair: operator; and
17281728
17291729The expression ``x and y `` first evaluates *x *; if *x * is false, its value is
17301730returned; otherwise, *y * is evaluated and the resulting value is returned.
17311731
1732- .. index :: operator: or
1732+ .. index :: pair: operator; or
17331733
17341734The expression ``x or y `` first evaluates *x *; if *x * is true, its value is
17351735returned; otherwise, *y * is evaluated and the resulting value is returned.
0 commit comments