On 10/6/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > Ron Adam wrote: > > > I think what may be missing is a larger set of higher level string functions > > that will work with lists of strings directly. Then lists of strings can be > > thought of as a mutable string type by its use, and then working with > > substrings > > in lists and using ''.join() will not seem as out of place. > > as important is the observation that you don't necessarily have to join > string lists; if the data ends up being sent over a wire or written to > disk, you might as well skip the join step, and work directly from the list. > > (it's no accident that ET has grown "tostringlist" and "fromstringlist" > functions, for example ;-)
The just make lists paradigm is used by Erlang too, it's called "iolist" there (it's not a type, just a convention). The lists can be nested though, so concatenating chunks of data for IO is always a constant time operation even if the chunks are already iolists. -bob _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com