String.join revisited (URGENT for 1.6)
Johann Hibschman
johann at physics.berkeley.edu
Tue May 30 16:24:04 EDT 2000
Terry Reedy writes:
> Unlike some others, I am comfortable enough with
> joinstring.join(stringseq). I see 'join' is a message to joinstring to
> join up the items in stringseq (currently, a tuple or list) with itself and
> return the result as one string.
Actually, it sounds more and more to me like 'join' should just be
left as a function, and not made a method at all. Is there any good
argument that it should be a method? The only one I can think of is
that a user can define a UserString class which could implement it.
Now if python had CLOS-like generic functions, we could have the cake
and eat it too, allowing us to define our own join-functions to extend
the existing one. But that's another story... ;-)
--Johann
--
Johann Hibschman johann at physics.berkeley.edu
More information about the Python-list
mailing list