In particular, in Python, can I tell whether a wrapper class is abstract?
After investigating the generated wrapper code, I found that when the C++
class is abstract, the wrapper Python class will have SwigPyBuiltin_BadInit
as its initproc. SwigPyBuiltin_BadInit simply throws a TypeError.
Now I have to decide in Python whether a class is abstract or not. One
method is try to construct the object and catch a TypeError. But TypeError
can also be caused by many reasons other than that class is abstract. So
I'm wondering is there any better way to decide this?
Thank you very much!
Get latest updates about Open Source Projects, Conferences and News.