anything like C++ references?

Stephen Horne intentionally at blank.co.uk
Tue Jul 15 18:21:33 EDT 2003


On Tue, 15 Jul 2003 15:16:40 -0700, Tom Plunket <tomas at fancy.org>
wrote:

>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.

Ah - makes sense. Bugger. There goes my nice neat 'but they can do it'
argument :-(





More information about the Python-list mailing list