[C++-sig] Loosing real python type in Python extend class

2010-03-18 Thread Alexandre Hamez
given by the C++ side, then the type that __eq__ sees is 'module.Foo'. Is there a way to give to the __eq__ method the real python type? I suppose I can use a to_python_converter, but I'm not sure how to do this. Thank you! - Alexandre Hamez ___ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Ownership of a C++ object extended in Python using wrapper

2010-03-17 Thread Alexandre Hamez
On 16 mars 2010, at 22:21, Jim Bosch wrote: > On Tue, 2010-03-16 at 20:56 +0100, Alexandre Hamez wrote: >> On 16 mars 2010, at 13:12, Neal Becker wrote: >> >>> Alexandre Hamez wrote: >>> >>>> Hi all, >>>> >>>> I have a C+

Re: [C++-sig] Ownership of a C++ object extended in Python using wrapper

2010-03-16 Thread Alexandre Hamez
On 16 mars 2010, at 13:12, Neal Becker wrote: > Alexandre Hamez wrote: > >> Hi all, >> >> I have a C++ library that needs to store in a hash map user's code, that >> is, Python-extended objects. To make the C++ interface available to >> Python, I use

[C++-sig] Ownership of a C++ object extended in Python using wrapper

2010-03-16 Thread Alexandre Hamez
m for this particular use case, but in the end, no solution is given. So my question is the following: as of today, what is the correct way to tell Python we hold a reference to Python extend objects of C++ classes, using the boost::python::wrapper mechanism? Thanks, -