diff options
author | Barry Warsaw <barry@python.org> | 1997-08-22 21:22:58 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1997-08-22 21:22:58 (GMT) |
commit | c0dc92af7d41ecf1d60f4ab29452d7179c039d8c (patch) | |
tree | 207d717b9b91dac3b1b7a605ed2292cc87830e69 /Doc/lib/libparser.tex | |
parent | cde8b1ba0c0948f2cec00d11821214e06ca419cb (diff) | |
download | cpython-c0dc92af7d41ecf1d60f4ab29452d7179c039d8c.zip cpython-c0dc92af7d41ecf1d60f4ab29452d7179c039d8c.tar.gz cpython-c0dc92af7d41ecf1d60f4ab29452d7179c039d8c.tar.bz2 |
Three new C API functions:
- int PyErr_GivenExceptionMatches(obj1, obj2)
Returns 1 if obj1 and obj2 are the same object, or if obj1 is an
instance of type obj2, or of a class derived from obj2
- int PyErr_ExceptionMatches(obj)
Higher level wrapper around PyErr_GivenExceptionMatches() which uses
PyErr_Occurred() as obj1. This will be the more commonly called
function.
- void PyErr_NormalizeException(typeptr, valptr, tbptr)
Normalizes exceptions, and places the normalized values in the
arguments. If type is not a class, this does nothing. If type is a
class, then it makes sure that value is an instance of the class by:
1. if instance is of the type, or a class derived from type, it does
nothing.
2. otherwise it instantiates the class, using the value as an
argument. If value is None, it uses an empty arg tuple, and if
the value is a tuple, it uses just that.
Diffstat (limited to 'Doc/lib/libparser.tex')
0 files changed, 0 insertions, 0 deletions