On Thu, 2006-03-30 at 12:05 +1200, Greg Ewing wrote: > Stefan Rank wrote: > > > A big question is: Should slicing also return views? and why not? > > That's been considered before, in relation to strings. > The stumbling block is the problem of a view of a > small part of the object keeping the whole thing > alive and using up memory. > > While having a separate way of getting slice-views > could be useful, I think it would be too big a > change in semantics to make it the default > behaviour of slicing notation.
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. Eww. Maybe my memory failed me. - Adam, _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com