summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/exceptions.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-07-13 13:59:24 (GMT)
committerGeorg Brandl <georg@python.org>2011-07-13 13:59:24 (GMT)
commitfbe84d92ab0be0dbfc3f8f16b8fd53d8373ba37c (patch)
treead0248372b94d47e0c42cb835c19190a34101405 /Doc/c-api/exceptions.rst
parent83c14fe1ee862b405eea5d7e6ac2cc93db4b8bd1 (diff)
downloadcpython-fbe84d92ab0be0dbfc3f8f16b8fd53d8373ba37c.zip
cpython-fbe84d92ab0be0dbfc3f8f16b8fd53d8373ba37c.tar.gz
cpython-fbe84d92ab0be0dbfc3f8f16b8fd53d8373ba37c.tar.bz2
Clarify that PyErr_NewException creates an exception *class*, not instance.
Diffstat (limited to 'Doc/c-api/exceptions.rst')
-rw-r--r--Doc/c-api/exceptions.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst
index 8b1e8fc..a001145 100644
--- a/Doc/c-api/exceptions.rst
+++ b/Doc/c-api/exceptions.rst
@@ -352,10 +352,10 @@ is a separate error indicator for each thread.
.. cfunction:: PyObject* PyErr_NewException(char *name, PyObject *base, PyObject *dict)
- This utility function creates and returns a new exception object. The *name*
+ This utility function creates and returns a new exception class. The *name*
argument must be the name of the new exception, a C string of the form
- ``module.class``. The *base* and *dict* arguments are normally *NULL*. This
- creates a class object derived from :exc:`Exception` (accessible in C as
+ ``module.classname``. The *base* and *dict* arguments are normally *NULL*.
+ This creates a class object derived from :exc:`Exception` (accessible in C as
:cdata:`PyExc_Exception`).
The :attr:`__module__` attribute of the new class is set to the first part (up