I am using boost.python to wrap a C++ class \'A\' which takes a string as constructor. I then have a function \'fun(A& arg)\' which takes a reference to an \'A\' as para
For that to work fun(a)
would have to modify the original a
object reference. What fun(a)
actually gets is a local copy of object reference a
, not the original a
object reference passed as an argument.
In other words, Python does not work like that, you would need to call it as a = fun(a)
to be able to change reference a
(not the object it refers to).