Why doesn't join() call str() on its arguments?

Michael Hoffman cam.ac.uk at mh391.invalid
Wed Feb 16 19:19:15 EST 2005


Fredrik Lundh wrote:

> I've proposed adding a "join" built-in that knows about the available string types,
> and does the right thing for non-string objects.

That would be *so* useful. I frequently have to use the

"".join(map(str, mylist))

idiom, which is a wart.
-- 
Michael Hoffman



More information about the Python-list mailing list