[Python-checkins] cpython (3.2): Clarify that PyErr_NewException creates an exception *class*, not instance.
georg.brandl
python-checkins at python.org
Wed Jul 13 15:59:47 CEST 2011
http://hg.python.org/cpython/rev/9c6f7fe31d8e
changeset: 71304:9c6f7fe31d8e
branch: 3.2
parent: 71301:842f5ed06255
user: Georg Brandl <georg at python.org>
date: Wed Jul 13 15:59:24 2011 +0200
summary:
Clarify that PyErr_NewException creates an exception *class*, not instance.
files:
Doc/c-api/exceptions.rst | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst
--- a/Doc/c-api/exceptions.rst
+++ b/Doc/c-api/exceptions.rst
@@ -354,10 +354,10 @@
.. c:function:: 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
:c:data:`PyExc_Exception`).
The :attr:`__module__` attribute of the new class is set to the first part (up
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list