[C++-sig] TnFOX with the latest py++ from SVN
Niall Douglas
s_sourceforge at nedprod.com
Mon Oct 2 16:42:18 CEST 2006
On 2 Oct 2006 at 9:15, David Abrahams wrote:
> >> Surely BPL can rebind the value of sx on output back to the input? I
> >> remember something in the tutorial about this just working out of the
> >> box.
> >
> > No it can not. In near future it will be very easy to instruct Py++ to
> > create wrapper
> > for such functions.
>
> But even with a wrapper it's never going to automagically rebind
> anything, FWIW.
I'm probably being stupid, but surely if you pass by non-const
reference then you *expect* it to change?
Of course, modified in C++ is not modified in Python where basic
types are immutable. But it does seem a reasonable approximation that
as a default, the python parameter is rebound to the output value for
integral types.
Cheers,
Niall
More information about the Cplusplus-sig
mailing list