[C++-sig] Need strategic advice designing Boost/Python program
Stefan Seefeld
seefeld at sympatico.ca
Tue May 1 00:22:38 CEST 2007
Craig Finch wrote:
> I keep getting error messages like this one when I define a constructor
> in Python:
> Boost.Python.ArgumentError: Python argument types in
> python_constructor.value(python_constructor)
> did not match C++ signature:
> value(python_constructor {lvalue})
> This error message is from a simple test case that I have created.
Since you don't show any specific code I have to guess: Are you
calling the base class constructor in your derived class constructor ?
In contrast to C++, Python doesn't do this automatically for you, so
if you forget to initialize the base class you may see conflicts such
as the above when passing a derived where a base is expected.
> BTW, I'm injecting the method from __init__.py. I'm probably doing
> something wrong--should I start a new discussion thread, since this is
> kind of a side topic?
If you have a specific question (with code samples etc.) that may
make sense. It's up to you.
I'm not sure what __init__.py is here. So I guess a complete test case
would indeed help.
Regards,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
More information about the Cplusplus-sig
mailing list