[C++-sig] Re: Type Exception of type Argument Error

Brian Hall bhall at gamers-fix.com
Mon Jul 12 00:09:43 CEST 2004


I tried to simplify it further, but I didn't want to get too far from the
scope of what I'm doing and wind up having it not even be the same problem
anymore.

The crux of the problem is this:

I have a class A which holds a reference to another class B which it gets in
its constructor.
I have a python class C which inherits from class A.
I run the script containing the declaration of class C and store it in a
Boost.Python 'object'.
I construct a class B C++ object.
I use the Boost.Python 'object' to create an instance of class C and pass
the class B object in for the object's __init__.
I execute a method on the new instance, expecting the B C++ object I made to
be the one getting modified.

Attached is some simplified code... it compiles but the error isn't quite
the same as what I'm getting on my full test case, though it is similar.


I expect to see:
B Value: 10
Hello from Python
B Value(py): 10
B Value(py): 5
Goodbye from Python
B Value: 5

B Value: 10
Hello from Python
B Value(py):  1.46175160111e-038		(my full test case gives 10)
B Value(py):  1.46175160111e-038		(my full test case gives 5)
Goodbye from Python
B Value: 10

Hope this clears things up...

Brian

-----Original Message-----
From: c++-sig-bounces+bhall=gamers-fix.com at python.org
[mailto:c++-sig-bounces+bhall=gamers-fix.com at python.org] On Behalf Of David
Abrahams
Sent: Sunday, July 11, 2004 3:31 PM
To: c++-sig at python.org
Subject: [C++-sig] Re: Type Exception of type Argument Error

"Brian Hall" <bhall at gamers-fix.com> writes:

> Here is a simple project that shows the problem...

This is still way too complicated for me to analyze.  Please reduce it to
a single C++ file (no headers) and a single Python file.  Remove all
of the code that's irrelevant to the problem -- there' a great deal
of that here.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

_______________________________________________
C++-sig mailing list
C++-sig at python.org
http://mail.python.org/mailman/listinfo/c++-sig
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: SimplifiedMore.cpp
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20040711/b6043848/attachment.txt>


More information about the Cplusplus-sig mailing list