On 2/20/07, Roman Yakovenko <roman.yakovenko@gmail.com> wrote:
On 2/20/07, Gustavo Carneiro <gjcarneiro@gmail.com> wrote:
On 2/19/07, Roman Yakovenko <roman.yakovenko@gmail.com > wrote:
Hi. Unfortunately I reproduced the error and was not able to  fix it :-(((((.

  Hey, thanks a lot anyway; it is now a problem in boost, but you solved the Py++ part of the problem with commendable speed.

There is something I don't understand  and I think  this is  Boost.Python bug.

I do made some progress.

1. When you derive Python class from a C++ one you have to define __init__
    method, otherwise your code will not work:

  Since when does a subclass have to define __init__ in order to get the parent class __init__ called?  What you say goes against all my python knowledge...

During __init__ method of parent class reference to relevant Python object is
saved and associated with the C++ class.

  But if I don't define __init__ in a subclass, the parent class __init__ is automatically used instead, as demonstrated by this example:

class Foo(object):
    def __init__(self):
        print "Foo.__init__"

class Bar(Foo):

bar = Bar()

  I think the problem you want to express is when Bar defines __init__ but doesn't chain to the parent class __init__.

Gustavo J. A. M. Carneiro
"The universe is always one step beyond logic."