[Python-3000] Iterators for dict keys, values, and items == annoying :)

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Mar 31 04:21:24 CEST 2006


Adam DePrince wrote:

> No reason we can't make other string operations views as well ...
> concatenation is one example.  If I recall, that's how snobol handles
> strings, view upon view upon view.

I don't think it was quite as bad as that. If I
remember correctly, when you took a substring
you didn't get a view of a view, but another
view of the underlying layer holding the
characters. And there was some way of detecting
when parts of the underlying buffer were no
longer used and freeing them.

One strange thing Snobol did do was effectively
intern every string, though. And it had some
weird-assed name for them like "natural variable"
or some such...

--
Greg


More information about the Python-3000 mailing list