Jim Jewett wrote:
> On 1/12/07, Guido van Rossum <[EMAIL PROTECTED]> wrote:
>> But IIUC the string may already have been seen by other code, right?
>> This violates immutability, and that's not acceptable.
> No.
>
> IIRC, the string was rendered as soon as any code viewed it.  Since it 
> isn't rendered yet, nothing has viewed it previously.
"Yes," because someone (the caller) is viewing it *now*.  The caller 
might compute something based on the invalid (unrendered) string and 
think it had been successful.  If those results outlive the memory 
exception and get used for further processing, the program has just 
silently diverged from correct behavior.

Of the five I've proposed so far, Guido's right, only changing the API 
will preserve the speedup *and* result in correct behavior.  But I 
maintain some dim hope that a sixth exists, waiting only to be suggested 
by some shining intellect.

Cheers,


/larry/
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to