anything like C++ references?

Tom Plunket tomas at fancy.org
Tue Jul 15 18:16:40 EDT 2003


Stephen Horne wrote:

>   std::string x = "123";
>   std::string y = x;
> 
>   //  At this point, in most implementations, x and y are bound to the
>   //  same object due to a lazy copy optimisation.

Actually, that isn't the case these days.  I'm sure there are
some who do this optimization still, but it is incredibly hard to
do so in a thread-safe manner so all of the heavies as far as I
know don't do it anymore.

-tom!

-- 
There's really no reason to send a copy of your
followup to my email address, so please don't.




More information about the Python-list mailing list