@@ -71,7 +71,7 @@ An identifier occurring as an atom is a name. See section :ref:`identifiers`
71
71
for lexical definition and section :ref: `naming ` for documentation of naming and
72
72
binding.
73
73
74
- .. index :: exception: NameError
74
+ .. index :: pair: exception; NameError
75
75
76
76
When the name is bound to an object, evaluation of the atom yields that object.
77
77
When a name is not bound, an attempt to evaluate it raises a :exc: `NameError `
@@ -534,7 +534,7 @@ be used to control the execution of a generator function.
534
534
Note that calling any of the generator methods below when the generator
535
535
is already executing raises a :exc: `ValueError ` exception.
536
536
537
- .. index :: exception: StopIteration
537
+ .. index :: pair: exception; StopIteration
538
538
539
539
540
540
.. method :: generator.__next__()
@@ -584,7 +584,7 @@ is already executing raises a :exc:`ValueError` exception.
584
584
:attr: `~BaseException.__traceback__ ` attribute stored in *value * may
585
585
be cleared.
586
586
587
- .. index :: exception: GeneratorExit
587
+ .. index :: pair: exception; GeneratorExit
588
588
589
589
590
590
.. method :: generator.close()
@@ -706,7 +706,7 @@ This subsection describes the methods of an asynchronous generator iterator,
706
706
which are used to control the execution of a generator function.
707
707
708
708
709
- .. index :: exception: StopAsyncIteration
709
+ .. index :: pair: exception; StopAsyncIteration
710
710
711
711
.. coroutinemethod :: agen.__anext__()
712
712
@@ -752,7 +752,7 @@ which are used to control the execution of a generator function.
752
752
raises a different exception, then when the awaitable is run that exception
753
753
propagates to the caller of the awaitable.
754
754
755
- .. index :: exception: GeneratorExit
755
+ .. index :: pair: exception; GeneratorExit
756
756
757
757
758
758
.. coroutinemethod :: agen.aclose()
@@ -799,7 +799,7 @@ An attribute reference is a primary followed by a period and a name:
799
799
attributeref: `primary ` "." `identifier `
800
800
801
801
.. index ::
802
- exception: AttributeError
802
+ pair: exception; AttributeError
803
803
pair: object; module
804
804
pair: object; list
805
805
@@ -1230,7 +1230,7 @@ applies to integral numbers or to custom objects that override the
1230
1230
1231
1231
1232
1232
1233
- .. index :: exception: TypeError
1233
+ .. index :: pair: exception; TypeError
1234
1234
1235
1235
In all three cases, if the argument does not have the proper type, a
1236
1236
:exc: `TypeError ` exception is raised.
@@ -1277,7 +1277,7 @@ builtin Python types implement this operator.
1277
1277
.. versionadded :: 3.5
1278
1278
1279
1279
.. index ::
1280
- exception: ZeroDivisionError
1280
+ pair: exception; ZeroDivisionError
1281
1281
single: division
1282
1282
pair: operator; / (slash)
1283
1283
pair: operator; //
@@ -1366,7 +1366,7 @@ the left or right by the number of bits given by the second argument.
1366
1366
This operation can be customized using the special :meth: `__lshift__ ` and
1367
1367
:meth: `__rshift__ ` methods.
1368
1368
1369
- .. index :: exception: ValueError
1369
+ .. index :: pair: exception; ValueError
1370
1370
1371
1371
A right shift by *n * bits is defined as floor division by ``pow(2,n) ``. A left
1372
1372
shift by *n * bits is defined as multiplication with ``pow(2,n) ``.
0 commit comments