[C++-sig] Boost.Python : Return std::string by ref?
Stefan Seefeld
seefeld at sympatico.ca
Thu May 15 12:50:19 CEST 2008
Brian,
Brian O'Kennedy wrote:
>
> Hi Hans,
>
>
>
> Thanks for that, exactly what I wanted! I should have RTFA... :)
>
Are you sure it really does what you think it does ?
In Python strings are immutable, so there is little sense (other than
performance) wanting to pass strings by reference. You can't modify them
anyway. What observation makes you believe the string hasn't got copied
in python ?
Regards,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
More information about the Cplusplus-sig
mailing list