[Python-Dev] cpython: Add documentation for the new PyErr_SetFromImport* functions (original) (raw)
Brian Curtin brian at python.org
Tue Apr 17 01:19:05 CEST 2012
- Previous message: [Python-Dev] cpython: Add documentation for the new PyErr_SetFromImport* functions
- Next message: [Python-Dev] Failed issue tracker submission
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Apr 16, 2012 at 18:02, Georg Brandl <g.brandl at gmx.net> wrote:
On 16.04.2012 22:14, brian.curtin wrote:
http://hg.python.org/cpython/rev/5cc8b717b38c changeset: 76363:5cc8b717b38c user: Brian Curtin<brian at python.org> date: Mon Apr 16 15:14:36 2012 -0500 summary: Add documentation for the new PyErrSetFromImport* functions files: Doc/c-api/exceptions.rst | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 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 @@ -229,6 +229,24 @@ Similar to :c:func:
PyErrSetFromWindowsErrWithFilename
, with an additional parameter specifying the exception type to be raised. Availability: Windows. +.. c:function:: PyObject* PyErrSetExcWithArgsKwargs(PyObject *exc, PyObject *args, PyObject *kwargs) + + This is a convenience function to set an exc with the given args and + kwargs values. If args isNULL
, an empty :func:tuple
will be + created when exc is created via :c:func:PyObjectCall
. + +.. c:function:: PyObject* PyErrSetFromImportErrorWithName(PyObject *msg, PyObject *name) + + This is a convenience function to raise :exc:ImportError
. msg will be + set as the exception's message string, and name will be set as the + :exc:ImportError
'sname
attribute. + +.. c:function:: PyObject* PyErrSetFromImportErrorWithNameAndPath(PyObject *msg, PyObject *name, PyObject *path) + + This is a convenience function to raise :exc:ImportError
. msg will be + set as the exception's message string. Both name and path will be set + as the :exc:ImportError
's respectivename
andpath
attributes. + versionadded please.
http://hg.python.org/cpython/rev/d79aa61ec96d
- Previous message: [Python-Dev] cpython: Add documentation for the new PyErr_SetFromImport* functions
- Next message: [Python-Dev] Failed issue tracker submission
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]