Boost logo

Boost :

From: Ivan A. Vigasin (vig_at_[hidden])
Date: 2001-11-14 10:02:13

On Wed, 14 Nov 2001, David Abrahams wrote:

> Perhaps. What versions are you using?
Python 2.1 on Solaris8, boost-1.24

> OK, I believe that Python2.2 is just being liberal, here. If you look at the
> code below, Boost.Python only does that method unwinding when looking at
> /base/ class attributes. So, this should work for you:
> class Base:
> def __init__(self):
> self.x = 'x'
> class BasePrime(Base):
> __init_Base_ = Base.__init__
> class Derived(A1,BasePrime):
> def __init__(self):
> A1.__init__(self)
> self.__init_Base_()
> self.y = 'y'
It works. But only if Base is root of inheritance tree. Otherwise we get same error for all Base's ancestors.


> class BasePrime(Base): pass
> class Derived(A1,BasePrime):
> def __init__(self):
> A1.__init__(self)
> BasePrime.__init__(self)
It doesn't work at all ;(

Regards, Ivan <vig_at_[hidden]>
ICQ: 22181170

Boost list run by bdawes at, gregod at, cpdaniel at, john at