[Python-Dev] Death to string functions!
Fredrik Lundh
fredrik@effbot.org
Tue, 19 Dec 2000 16:39:49 +0100
"Christopher Petrilli" wrote:
> didn't seem to look wrong. I finally put my finger on it, and I
> haven't seen anyone mention it, so I guess I'll do so. To me, the
> concept of "join" on a string is just not quite kosher, instead it
> should be something like this:
>
> aList.join(" ")
>
> or if you want it without the indirection:
>
> ['item', 'item', 'item'].join(" ")
>
> Now *THAT* looks right to me.
why do we keep coming back to this?
aString.join can do anything string.join can do, but aList.join
cannot. if you don't understand why, check the archives.
</F>