[Python-checkins] cpython (2.7): Clarify that PyErr_NewException creates an exception *class*, not instance.

georg.brandl python-checkins at python.org
Wed Jul 13 16:35:47 CEST 2011


http://hg.python.org/cpython/rev/488c6b481652
changeset:   71306:488c6b481652
branch:      2.7
parent:      71300:02a591131360
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
@@ -352,10 +352,10 @@
 
 .. 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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list