[C++-sig] Copying objects derived in python from C++?

Hans Meine meine at informatik.uni-hamburg.de
Thu Jun 7 09:58:50 CEST 2007


Am Donnerstag, 07. Juni 2007 02:48:34 schrieb Mark Williams:
> Thanks, this certainly seems to be the case. If I add
> ".enable_pickling()" to my Base class definition, then the example I
> posted works as expected. However, if I then modify the Derived class
> constructor so that it takes an argument, e.g.:
>
> [...]
> TypeError: __init__() takes exactly 2 arguments (1 given)

How about adding pickle functions (i.e. __getinitargs__) to Derived, then?

-- 
Ciao, /  /
     /--/
    /  / ANS



More information about the Cplusplus-sig mailing list