summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorcocoatomo <cocoatomo77@gmail.com>2017-04-20 03:56:05 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2017-04-20 03:56:05 (GMT)
commit7e56fe35efe3aef0b9aac989255c4f13dfc01b09 (patch)
treeed5f353be1803269063a732abb911047a94546e9 /Doc/c-api
parentc97c1914f401359f2a7e6c8e0364e71ad9fb5bc8 (diff)
downloadcpython-7e56fe35efe3aef0b9aac989255c4f13dfc01b09.zip
cpython-7e56fe35efe3aef0b9aac989255c4f13dfc01b09.tar.gz
cpython-7e56fe35efe3aef0b9aac989255c4f13dfc01b09.tar.bz2
bpo-19225: Remove duplicated description for standard warning categories (GH-1068)
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/exceptions.rst21
1 files changed, 9 insertions, 12 deletions
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst
index cf2385f..b8af520 100644
--- a/Doc/c-api/exceptions.rst
+++ b/Doc/c-api/exceptions.rst
@@ -291,16 +291,11 @@ an error value).
is the function calling :c:func:`PyErr_WarnEx`, 2 is the function above that,
and so forth.
- Warning categories must be subclasses of :c:data:`Warning`; the default warning
- category is :c:data:`RuntimeWarning`. The standard Python warning categories are
- available as global variables whose names are ``PyExc_`` followed by the Python
- exception name. These have the type :c:type:`PyObject\*`; they are all class
- objects. Their names are :c:data:`PyExc_Warning`, :c:data:`PyExc_UserWarning`,
- :c:data:`PyExc_UnicodeWarning`, :c:data:`PyExc_DeprecationWarning`,
- :c:data:`PyExc_SyntaxWarning`, :c:data:`PyExc_RuntimeWarning`, and
- :c:data:`PyExc_FutureWarning`. :c:data:`PyExc_Warning` is a subclass of
- :c:data:`PyExc_Exception`; the other warning categories are subclasses of
- :c:data:`PyExc_Warning`.
+ Warning categories must be subclasses of :c:data:`PyExc_Warning`;
+ :c:data:`PyExc_Warning` is a subclass of :c:data:`PyExc_Exception`;
+ the default warning category is :c:data:`PyExc_RuntimeWarning`. The standard
+ Python warning categories are available as global variables whose names are
+ enumerated at :ref:`standarwarningcategories`.
For information about warning control, see the documentation for the
:mod:`warnings` module and the :option:`-W` option in the command line
@@ -942,8 +937,10 @@ Notes:
Only defined on Windows; protect code that uses this by testing that the
preprocessor macro ``MS_WINDOWS`` is defined.
-Standard Warnings
-=================
+.. _standarwarningcategories:
+
+Standard Warning Categories
+===========================
All standard Python warning categories are available as global variables whose
names are ``PyExc_`` followed by the Python exception name. These have the type