@@ -286,16 +286,11 @@ is a separate error indicator for each thread.
286
286
exception handling (for example, :c:func: `Py_DECREF ` owned references and return
287
287
an error value).
288
288
289
- Warning categories must be subclasses of :c:data:`Warning`; the default warning
290
- category is :c:data: `RuntimeWarning `. The standard Python warning categories are
291
- available as global variables whose names are ``PyExc_ `` followed by the Python
292
- exception name. These have the type :c:type: `PyObject\* `; they are all class
293
- objects. Their names are :c:data: `PyExc_Warning `, :c:data: `PyExc_UserWarning `,
294
- :c:data: `PyExc_UnicodeWarning `, :c:data: `PyExc_DeprecationWarning `,
295
- :c:data: `PyExc_SyntaxWarning `, :c:data: `PyExc_RuntimeWarning `, and
296
- :c:data: `PyExc_FutureWarning `. :c:data: `PyExc_Warning ` is a subclass of
297
- :c:data: `PyExc_Exception `; the other warning categories are subclasses of
298
- :c:data: `PyExc_Warning `.
289
+ Warning categories must be subclasses of :c:data:`PyExc_Warning`;
290
+ :c:data: `PyExc_Warning ` is a subclass of :c:data: `PyExc_Exception `;
291
+ the default warning category is :c:data: `PyExc_RuntimeWarning `. The standard
292
+ Python warning categories are available as global variables whose names are
293
+ enumerated at :ref: `standarwarningcategories `.
299
294
300
295
For information about warning control, see the documentation for the
301
296
:mod: `warnings ` module and the :option: `-W ` option in the command line
@@ -670,8 +665,10 @@ Notes:
670
665
Only defined on VMS; protect code that uses this by testing that the
671
666
preprocessor macro ``__VMS `` is defined.
672
667
673
- Standard Warnings
674
- =================
668
+ .. _standarwarningcategories :
669
+
670
+ Standard Warning Categories
671
+ ===========================
675
672
676
673
All standard Python warning categories are available as global variables whose
677
674
names are ``PyExc_ `` followed by the Python exception name. These have the type
0 commit comments