@@ -180,7 +180,7 @@ For convenience, some of these functions will always return a
180
180
181
181
.. c :function :: PyObject* PyErr_SetFromErrno (PyObject *type)
182
182
183
- .. index :: single: strerror( )
183
+ .. index :: single: strerror (C function )
184
184
185
185
This is a convenience function to raise an exception when a C library function
186
186
has returned an error and set the C variable :c:data: `errno `. It constructs a
@@ -396,7 +396,7 @@ an error value).
396
396
.. c :function :: int PyErr_ResourceWarning (PyObject *source, Py_ssize_t stack_level, const char *format, ...)
397
397
398
398
Function similar to :c:func: `PyErr_WarnFormat `, but *category * is
399
- :exc: `ResourceWarning ` and it passes *source * to :func: ` warnings.WarningMessage `.
399
+ :exc: `ResourceWarning ` and it passes *source * to :class: ` ! warnings.WarningMessage `.
400
400
401
401
.. versionadded :: 3.6
402
402
@@ -635,7 +635,7 @@ Signal Handling
635
635
636
636
.. index::
637
637
pair: module; signal
638
- single: SIGINT
638
+ single: SIGINT (C macro)
639
639
single: KeyboardInterrupt (built-in exception )
640
640
641
641
This function interacts with Python's signal handling.
@@ -666,7 +666,7 @@ Signal Handling
666
666
667
667
.. index::
668
668
pair: module; signal
669
- single: SIGINT
669
+ single: SIGINT (C macro)
670
670
single: KeyboardInterrupt (built-in exception )
671
671
672
672
Simulate the effect of a :c:macro: `!SIGINT ` signal arriving.
@@ -732,7 +732,7 @@ Exception Classes
732
732
This creates a class object derived from :exc: `Exception ` (accessible in C as
733
733
:c:data: `PyExc_Exception `).
734
734
735
- The :attr:`__module__` attribute of the new class is set to the first part (up
735
+ The :attr:`! __module__` attribute of the new class is set to the first part (up
736
736
to the last dot) of the *name* argument, and the class name is set to the last
737
737
part (after the last dot). The *base* argument can be used to specify alternate
738
738
base classes; it can either be only one class or a tuple of classes. The *dict*
@@ -904,8 +904,8 @@ because the :ref:`call protocol <call>` takes care of recursion handling.
904
904
905
905
Marks a point where a recursive C-level call is about to be performed.
906
906
907
- If :c:macro: `USE_STACKCHECK ` is defined, this function checks if the OS
908
- stack overflowed using :c:func: `PyOS_CheckStack `. In this is the case, it
907
+ If :c:macro: `! USE_STACKCHECK ` is defined, this function checks if the OS
908
+ stack overflowed using :c:func: `PyOS_CheckStack `. If this is the case, it
909
909
sets a :exc: `MemoryError ` and returns a nonzero value.
910
910
911
911
The function then checks if the recursion limit is reached. If this is the
@@ -968,59 +968,59 @@ All standard Python exceptions are available as global variables whose names are
968
968
the variables:
969
969
970
970
.. index ::
971
- single: PyExc_BaseException
972
- single: PyExc_Exception
973
- single: PyExc_ArithmeticError
974
- single: PyExc_AssertionError
975
- single: PyExc_AttributeError
976
- single: PyExc_BlockingIOError
977
- single: PyExc_BrokenPipeError
978
- single: PyExc_BufferError
979
- single: PyExc_ChildProcessError
980
- single: PyExc_ConnectionAbortedError
981
- single: PyExc_ConnectionError
982
- single: PyExc_ConnectionRefusedError
983
- single: PyExc_ConnectionResetError
984
- single: PyExc_EOFError
985
- single: PyExc_FileExistsError
986
- single: PyExc_FileNotFoundError
987
- single: PyExc_FloatingPointError
988
- single: PyExc_GeneratorExit
989
- single: PyExc_ImportError
990
- single: PyExc_IndentationError
991
- single: PyExc_IndexError
992
- single: PyExc_InterruptedError
993
- single: PyExc_IsADirectoryError
994
- single: PyExc_KeyError
995
- single: PyExc_KeyboardInterrupt
996
- single: PyExc_LookupError
997
- single: PyExc_MemoryError
998
- single: PyExc_ModuleNotFoundError
999
- single: PyExc_NameError
1000
- single: PyExc_NotADirectoryError
1001
- single: PyExc_NotImplementedError
1002
- single: PyExc_OSError
1003
- single: PyExc_OverflowError
1004
- single: PyExc_PermissionError
1005
- single: PyExc_ProcessLookupError
1006
- single: PyExc_RecursionError
1007
- single: PyExc_ReferenceError
1008
- single: PyExc_RuntimeError
1009
- single: PyExc_StopAsyncIteration
1010
- single: PyExc_StopIteration
1011
- single: PyExc_SyntaxError
1012
- single: PyExc_SystemError
1013
- single: PyExc_SystemExit
1014
- single: PyExc_TabError
1015
- single: PyExc_TimeoutError
1016
- single: PyExc_TypeError
1017
- single: PyExc_UnboundLocalError
1018
- single: PyExc_UnicodeDecodeError
1019
- single: PyExc_UnicodeEncodeError
1020
- single: PyExc_UnicodeError
1021
- single: PyExc_UnicodeTranslateError
1022
- single: PyExc_ValueError
1023
- single: PyExc_ZeroDivisionError
971
+ single: PyExc_BaseException (C var)
972
+ single: PyExc_Exception (C var)
973
+ single: PyExc_ArithmeticError (C var)
974
+ single: PyExc_AssertionError (C var)
975
+ single: PyExc_AttributeError (C var)
976
+ single: PyExc_BlockingIOError (C var)
977
+ single: PyExc_BrokenPipeError (C var)
978
+ single: PyExc_BufferError (C var)
979
+ single: PyExc_ChildProcessError (C var)
980
+ single: PyExc_ConnectionAbortedError (C var)
981
+ single: PyExc_ConnectionError (C var)
982
+ single: PyExc_ConnectionRefusedError (C var)
983
+ single: PyExc_ConnectionResetError (C var)
984
+ single: PyExc_EOFError (C var)
985
+ single: PyExc_FileExistsError (C var)
986
+ single: PyExc_FileNotFoundError (C var)
987
+ single: PyExc_FloatingPointError (C var)
988
+ single: PyExc_GeneratorExit (C var)
989
+ single: PyExc_ImportError (C var)
990
+ single: PyExc_IndentationError (C var)
991
+ single: PyExc_IndexError (C var)
992
+ single: PyExc_InterruptedError (C var)
993
+ single: PyExc_IsADirectoryError (C var)
994
+ single: PyExc_KeyError (C var)
995
+ single: PyExc_KeyboardInterrupt (C var)
996
+ single: PyExc_LookupError (C var)
997
+ single: PyExc_MemoryError (C var)
998
+ single: PyExc_ModuleNotFoundError (C var)
999
+ single: PyExc_NameError (C var)
1000
+ single: PyExc_NotADirectoryError (C var)
1001
+ single: PyExc_NotImplementedError (C var)
1002
+ single: PyExc_OSError (C var)
1003
+ single: PyExc_OverflowError (C var)
1004
+ single: PyExc_PermissionError (C var)
1005
+ single: PyExc_ProcessLookupError (C var)
1006
+ single: PyExc_RecursionError (C var)
1007
+ single: PyExc_ReferenceError (C var)
1008
+ single: PyExc_RuntimeError (C var)
1009
+ single: PyExc_StopAsyncIteration (C var)
1010
+ single: PyExc_StopIteration (C var)
1011
+ single: PyExc_SyntaxError (C var)
1012
+ single: PyExc_SystemError (C var)
1013
+ single: PyExc_SystemExit (C var)
1014
+ single: PyExc_TabError (C var)
1015
+ single: PyExc_TimeoutError (C var)
1016
+ single: PyExc_TypeError (C var)
1017
+ single: PyExc_UnboundLocalError (C var)
1018
+ single: PyExc_UnicodeDecodeError (C var)
1019
+ single: PyExc_UnicodeEncodeError (C var)
1020
+ single: PyExc_UnicodeError (C var)
1021
+ single: PyExc_UnicodeTranslateError (C var)
1022
+ single: PyExc_ValueError (C var)
1023
+ single: PyExc_ZeroDivisionError (C var)
1024
1024
1025
1025
+-----------------------------------------+---------------------------------+----------+
1026
1026
| C Name | Python Name | Notes |
@@ -1151,18 +1151,18 @@ the variables:
1151
1151
These are compatibility aliases to :c:data:`PyExc_OSError`:
1152
1152
1153
1153
.. index::
1154
- single: PyExc_EnvironmentError
1155
- single: PyExc_IOError
1156
- single: PyExc_WindowsError
1154
+ single: PyExc_EnvironmentError (C var)
1155
+ single: PyExc_IOError (C var)
1156
+ single: PyExc_WindowsError (C var)
1157
1157
1158
1158
+-------------------------------------+----------+
1159
1159
| C Name | Notes |
1160
1160
+=====================================+==========+
1161
- | :c:data: `PyExc_EnvironmentError ` | |
1161
+ | :c:data:`! PyExc_EnvironmentError` | |
1162
1162
+-------------------------------------+----------+
1163
- | :c:data: `PyExc_IOError ` | |
1163
+ | :c:data:`! PyExc_IOError` | |
1164
1164
+-------------------------------------+----------+
1165
- | :c:data: `PyExc_WindowsError ` | [2 ]_ |
1165
+ | :c:data:`! PyExc_WindowsError` | [2]_ |
1166
1166
+-------------------------------------+----------+
1167
1167
1168
1168
.. versionchanged:: 3.3
@@ -1188,17 +1188,17 @@ names are ``PyExc_`` followed by the Python exception name. These have the type
1188
1188
the variables:
1189
1189
1190
1190
.. index ::
1191
- single: PyExc_Warning
1192
- single: PyExc_BytesWarning
1193
- single: PyExc_DeprecationWarning
1194
- single: PyExc_FutureWarning
1195
- single: PyExc_ImportWarning
1196
- single: PyExc_PendingDeprecationWarning
1197
- single: PyExc_ResourceWarning
1198
- single: PyExc_RuntimeWarning
1199
- single: PyExc_SyntaxWarning
1200
- single: PyExc_UnicodeWarning
1201
- single: PyExc_UserWarning
1191
+ single: PyExc_Warning (C var)
1192
+ single: PyExc_BytesWarning (C var)
1193
+ single: PyExc_DeprecationWarning (C var)
1194
+ single: PyExc_FutureWarning (C var)
1195
+ single: PyExc_ImportWarning (C var)
1196
+ single: PyExc_PendingDeprecationWarning (C var)
1197
+ single: PyExc_ResourceWarning (C var)
1198
+ single: PyExc_RuntimeWarning (C var)
1199
+ single: PyExc_SyntaxWarning (C var)
1200
+ single: PyExc_UnicodeWarning (C var)
1201
+ single: PyExc_UserWarning (C var)
1202
1202
1203
1203
+------------------------------------------+---------------------------------+----------+
1204
1204
| C Name | Python Name | Notes |
0 commit comments