From: Ivan A. Vigasin (vig_at_[hidden])
Date: 2001-11-13 19:39:23
On Tue, 13 Nov 2001, David Abrahams wrote:
Many thanks for your answer !
> The best workaround I can think of is to derive A from an extension class.
> You could just wrap a boring empty struct.
A is not mine. I tried to subclass from extension class and threading.Thread at the same time.
class MyClass(ExtClass, Thread):
Of course, it's possible to derive from ExtClass only and create threads separately as
But it's not good, and situation is worse in case of other foreign classes (from standard library, for example).
One of solutions is to wrap each extension class with real python class.
Possibly like folowing:
self.real = real
def EachMethod(self, *args):
self.extclass = ExtWrapper(self)
def EachMethod(self, args):
Can you offer more elegant solution?
Regards, Ivan <vig_at_[hidden]>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk