String.join revisited (URGENT for 1.6)
Johannes Stezenbach
yawyi at gmx.de
Sat Jun 3 06:52:32 EDT 2000
Juergen A. Erhard <jae at ilk.de> wrote:
>It would seem (at least to me) to be the nicest (and cleanest) design
>to be able to do:
>
> "some string".split().join()
Good point!
If split() splits a string into a list of strings, and split()
is a method of class String, and join() is the reverse operation
of split(), then join() should be a method of class List.
(Except that class List should really be ListOfStrings, which
isn't possible in Python --> Back to the beginning of
the discussion about extended join() semantics.)
Johannes
More information about the Python-list
mailing list