@@ -167,7 +167,7 @@ For convenience, some of these functions will always return a
167
167
168
168
.. c :function :: PyObject* PyErr_SetFromErrno (PyObject *type)
169
169
170
- .. index :: single: strerror( )
170
+ .. index :: single: strerror (C function )
171
171
172
172
This is a convenience function to raise an exception when a C library function
173
173
has returned an error and set the C variable :c:data: `errno `. It constructs a
@@ -383,7 +383,7 @@ an error value).
383
383
.. c :function :: int PyErr_ResourceWarning (PyObject *source, Py_ssize_t stack_level, const char *format, ...)
384
384
385
385
Function similar to :c:func: `PyErr_WarnFormat `, but *category * is
386
- :exc: `ResourceWarning ` and it passes *source * to :func: ` warnings.WarningMessage `.
386
+ :exc: `ResourceWarning ` and it passes *source * to :class: ` ! warnings.WarningMessage `.
387
387
388
388
.. versionadded :: 3.6
389
389
@@ -622,7 +622,7 @@ Signal Handling
622
622
623
623
.. index::
624
624
pair: module; signal
625
- single: SIGINT
625
+ single: SIGINT (C macro)
626
626
single: KeyboardInterrupt (built-in exception)
627
627
628
628
This function interacts with Python's signal handling.
@@ -653,7 +653,7 @@ Signal Handling
653
653
654
654
.. index::
655
655
pair: module; signal
656
- single: SIGINT
656
+ single: SIGINT (C macro)
657
657
single: KeyboardInterrupt (built-in exception)
658
658
659
659
Simulate the effect of a :c:macro: `!SIGINT ` signal arriving.
@@ -719,7 +719,7 @@ Exception Classes
719
719
This creates a class object derived from :exc: `Exception ` (accessible in C as
720
720
:c:data: `PyExc_Exception `).
721
721
722
- The :attr:`__module__` attribute of the new class is set to the first part (up
722
+ The :attr:`! __module__` attribute of the new class is set to the first part (up
723
723
to the last dot) of the *name* argument, and the class name is set to the last
724
724
part (after the last dot). The *base* argument can be used to specify alternate
725
725
base classes; it can either be only one class or a tuple of classes. The *dict*
@@ -891,8 +891,8 @@ because the :ref:`call protocol <call>` takes care of recursion handling.
891
891
892
892
Marks a point where a recursive C-level call is about to be performed.
893
893
894
- If :c:macro: `USE_STACKCHECK ` is defined, this function checks if the OS
895
- stack overflowed using :c:func: `PyOS_CheckStack `. In this is the case, it
894
+ If :c:macro: `! USE_STACKCHECK ` is defined, this function checks if the OS
895
+ stack overflowed using :c:func: `PyOS_CheckStack `. If this is the case, it
896
896
sets a :exc: `MemoryError ` and returns a nonzero value.
897
897
898
898
The function then checks if the recursion limit is reached. If this is the
@@ -955,59 +955,59 @@ All standard Python exceptions are available as global variables whose names are
955
955
the variables:
956
956
957
957
.. index ::
958
- single: PyExc_BaseException
959
- single: PyExc_Exception
960
- single: PyExc_ArithmeticError
961
- single: PyExc_AssertionError
962
- single: PyExc_AttributeError
963
- single: PyExc_BlockingIOError
964
- single: PyExc_BrokenPipeError
965
- single: PyExc_BufferError
966
- single: PyExc_ChildProcessError
967
- single: PyExc_ConnectionAbortedError
968
- single: PyExc_ConnectionError
969
- single: PyExc_ConnectionRefusedError
970
- single: PyExc_ConnectionResetError
971
- single: PyExc_EOFError
972
- single: PyExc_FileExistsError
973
- single: PyExc_FileNotFoundError
974
- single: PyExc_FloatingPointError
975
- single: PyExc_GeneratorExit
976
- single: PyExc_ImportError
977
- single: PyExc_IndentationError
978
- single: PyExc_IndexError
979
- single: PyExc_InterruptedError
980
- single: PyExc_IsADirectoryError
981
- single: PyExc_KeyError
982
- single: PyExc_KeyboardInterrupt
983
- single: PyExc_LookupError
984
- single: PyExc_MemoryError
985
- single: PyExc_ModuleNotFoundError
986
- single: PyExc_NameError
987
- single: PyExc_NotADirectoryError
988
- single: PyExc_NotImplementedError
989
- single: PyExc_OSError
990
- single: PyExc_OverflowError
991
- single: PyExc_PermissionError
992
- single: PyExc_ProcessLookupError
993
- single: PyExc_RecursionError
994
- single: PyExc_ReferenceError
995
- single: PyExc_RuntimeError
996
- single: PyExc_StopAsyncIteration
997
- single: PyExc_StopIteration
998
- single: PyExc_SyntaxError
999
- single: PyExc_SystemError
1000
- single: PyExc_SystemExit
1001
- single: PyExc_TabError
1002
- single: PyExc_TimeoutError
1003
- single: PyExc_TypeError
1004
- single: PyExc_UnboundLocalError
1005
- single: PyExc_UnicodeDecodeError
1006
- single: PyExc_UnicodeEncodeError
1007
- single: PyExc_UnicodeError
1008
- single: PyExc_UnicodeTranslateError
1009
- single: PyExc_ValueError
1010
- single: PyExc_ZeroDivisionError
958
+ single: PyExc_BaseException (C var)
959
+ single: PyExc_Exception (C var)
960
+ single: PyExc_ArithmeticError (C var)
961
+ single: PyExc_AssertionError (C var)
962
+ single: PyExc_AttributeError (C var)
963
+ single: PyExc_BlockingIOError (C var)
964
+ single: PyExc_BrokenPipeError (C var)
965
+ single: PyExc_BufferError (C var)
966
+ single: PyExc_ChildProcessError (C var)
967
+ single: PyExc_ConnectionAbortedError (C var)
968
+ single: PyExc_ConnectionError (C var)
969
+ single: PyExc_ConnectionRefusedError (C var)
970
+ single: PyExc_ConnectionResetError (C var)
971
+ single: PyExc_EOFError (C var)
972
+ single: PyExc_FileExistsError (C var)
973
+ single: PyExc_FileNotFoundError (C var)
974
+ single: PyExc_FloatingPointError (C var)
975
+ single: PyExc_GeneratorExit (C var)
976
+ single: PyExc_ImportError (C var)
977
+ single: PyExc_IndentationError (C var)
978
+ single: PyExc_IndexError (C var)
979
+ single: PyExc_InterruptedError (C var)
980
+ single: PyExc_IsADirectoryError (C var)
981
+ single: PyExc_KeyError (C var)
982
+ single: PyExc_KeyboardInterrupt (C var)
983
+ single: PyExc_LookupError (C var)
984
+ single: PyExc_MemoryError (C var)
985
+ single: PyExc_ModuleNotFoundError (C var)
986
+ single: PyExc_NameError (C var)
987
+ single: PyExc_NotADirectoryError (C var)
988
+ single: PyExc_NotImplementedError (C var)
989
+ single: PyExc_OSError (C var)
990
+ single: PyExc_OverflowError (C var)
991
+ single: PyExc_PermissionError (C var)
992
+ single: PyExc_ProcessLookupError (C var)
993
+ single: PyExc_RecursionError (C var)
994
+ single: PyExc_ReferenceError (C var)
995
+ single: PyExc_RuntimeError (C var)
996
+ single: PyExc_StopAsyncIteration (C var)
997
+ single: PyExc_StopIteration (C var)
998
+ single: PyExc_SyntaxError (C var)
999
+ single: PyExc_SystemError (C var)
1000
+ single: PyExc_SystemExit (C var)
1001
+ single: PyExc_TabError (C var)
1002
+ single: PyExc_TimeoutError (C var)
1003
+ single: PyExc_TypeError (C var)
1004
+ single: PyExc_UnboundLocalError (C var)
1005
+ single: PyExc_UnicodeDecodeError (C var)
1006
+ single: PyExc_UnicodeEncodeError (C var)
1007
+ single: PyExc_UnicodeError (C var)
1008
+ single: PyExc_UnicodeTranslateError (C var)
1009
+ single: PyExc_ValueError (C var)
1010
+ single: PyExc_ZeroDivisionError (C var)
1011
1011
1012
1012
+-----------------------------------------+---------------------------------+----------+
1013
1013
| C Name | Python Name | Notes |
@@ -1138,18 +1138,18 @@ the variables:
1138
1138
These are compatibility aliases to :c:data:`PyExc_OSError`:
1139
1139
1140
1140
.. index::
1141
- single: PyExc_EnvironmentError
1142
- single: PyExc_IOError
1143
- single: PyExc_WindowsError
1141
+ single: PyExc_EnvironmentError (C var)
1142
+ single: PyExc_IOError (C var)
1143
+ single: PyExc_WindowsError (C var)
1144
1144
1145
1145
+-------------------------------------+----------+
1146
1146
| C Name | Notes |
1147
1147
+=====================================+==========+
1148
- | :c:data: `PyExc_EnvironmentError ` | |
1148
+ | :c:data:`! PyExc_EnvironmentError` | |
1149
1149
+-------------------------------------+----------+
1150
- | :c:data: `PyExc_IOError ` | |
1150
+ | :c:data:`! PyExc_IOError` | |
1151
1151
+-------------------------------------+----------+
1152
- | :c:data: `PyExc_WindowsError ` | [2 ]_ |
1152
+ | :c:data:`! PyExc_WindowsError` | [2]_ |
1153
1153
+-------------------------------------+----------+
1154
1154
1155
1155
.. versionchanged:: 3.3
@@ -1175,17 +1175,17 @@ names are ``PyExc_`` followed by the Python exception name. These have the type
1175
1175
the variables:
1176
1176
1177
1177
.. index ::
1178
- single: PyExc_Warning
1179
- single: PyExc_BytesWarning
1180
- single: PyExc_DeprecationWarning
1181
- single: PyExc_FutureWarning
1182
- single: PyExc_ImportWarning
1183
- single: PyExc_PendingDeprecationWarning
1184
- single: PyExc_ResourceWarning
1185
- single: PyExc_RuntimeWarning
1186
- single: PyExc_SyntaxWarning
1187
- single: PyExc_UnicodeWarning
1188
- single: PyExc_UserWarning
1178
+ single: PyExc_Warning (C var)
1179
+ single: PyExc_BytesWarning (C var)
1180
+ single: PyExc_DeprecationWarning (C var)
1181
+ single: PyExc_FutureWarning (C var)
1182
+ single: PyExc_ImportWarning (C var)
1183
+ single: PyExc_PendingDeprecationWarning (C var)
1184
+ single: PyExc_ResourceWarning (C var)
1185
+ single: PyExc_RuntimeWarning (C var)
1186
+ single: PyExc_SyntaxWarning (C var)
1187
+ single: PyExc_UnicodeWarning (C var)
1188
+ single: PyExc_UserWarning (C var)
1189
1189
1190
1190
+------------------------------------------+---------------------------------+----------+
1191
1191
| C Name | Python Name | Notes |
0 commit comments