"Jim Jewett" <[EMAIL PROTECTED]> wrote: > With stringviews, you wouldn't need to be reindexing from the start of > the original string. The idiom would instead be a generalization of > "for line in file:" > > while data: > chunk, sep, data = data.partition() > > but the partition call would not need to copy the entire string; it > could simply return three views.
Also, with a little work, having string views be smart about concatenation (if two views are adjacent to each other, like chunk,sep or sep,data above, view1+view2 -> view3 on the original string), copies could further be minimized, and the earlier problem with readline, etc., can be avoided. - Josiah _______________________________________________ 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