Correct behavior for failure during __init__()
putsch at fiber.mxim.com
Wed May 16 18:47:46 EDT 2001
I'm wrapping a C library with with python and swig. I'm defining a class
like this (wLib) is the wrapped C library:
def __init__(self, arg1, arg2):
t1 = wLib.createObj(arg1, arg2)
self.Id = t1
It is possible that the call to wLib.createObj does not succeed. In this
case it is not clear to me what I should do where I've marked "NOW WHAT?"
in the code above.
Any suggestions and/or pointers will be greatly appreciated.
More information about the Python-list