I'm working on replacing hand-rolled python bindings with boost.python. Unfortunately, I've hit a bit of a snag at a particular construct:
a = someFunction(...) # returns an instance of myClass b = myClass(a) In the current bindings, this creates a new python object that references the same internal C++ object. It's effectively no-op, and I have no idea why it was written that way in the first place, but I have to maintain API compatibility. That being the case, how do I implement this in boost.python? I considered replacing __init__, but it seems if I implement that as a standalone function rather than a constructor, boost has already created a new C++ instance for me, so that's too late. I'm not really sure what else to try. _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig