[Python-Dev] just say no...

Tim Peters tim_one@email.msn.com
Tue, 16 Nov 1999 01:31:39 -0500


[Fred L. Drake, Jr.]
> ...
>   I wasn't suggesting the PyStringObject be changed, only that the
> PyUnicodeObject could maintain a reference.  Consider:
>
>         s = fp.read()
>         u = unicode(s, 'utf-8')
>
> u would now hold a reference to s, and s/s# would return a pointer
> into s instead of re-building the UTF-8 form.  I talked myself out of
> this because it would be too easy to keep a lot more string objects
> around than were actually needed.

Yet another use for a weak reference <0.5 wink>.