I've been exploring C++/Python binding layers.  The two that interest me the
most are Boost.Python and Shiboken. Looking at PySide and also
libsample/samplebinding that ships with Shiboken, I've seen that the
following behaves as one would expect:

a = ObjectType()
b = ObjectType()
b.setParent(a)
assert(a is b.parent())

I've tried something similar in Boost.Python, but I cannot get the assertion
to pass.  It seems that Boost.Python will generate a new python wrapper each
time you call b.parent(), so the ID of the returned object changes at each
call (even though it is the same C++ object being returned).

How does Shiboken ensure the same Python object is returned at each call to
parent()?  Since PySide started out in Boost.Python, was that able to
support this behavior using Boost, or was that part of the motivation in
creating a new binding generator?

Thanks!

Nathan
_______________________________________________
PySide mailing list
PySide@lists.pyside.org
http://lists.pyside.org/listinfo/pyside

Reply via email to