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

Nick Craig-Wood nick at craig-wood.com
Thu Feb 17 04:30:02 EST 2005


Nick Vargish <nav+posts at bandersnatch.org> wrote:
>  I feel pretty much the opposite... If a non-string-type has managed to
>  get into my list-of-strings, then something has gone wrong and I would
>  like to know about this potential problem.

This is a good argument.

Why not have another method to do this?  I propose joinany which will
join any type of object together, not just strings

That way it becomes less of a poke in the eye to backwards
compatibility too.

>  Nick "Explicit is better than Implicit"

Aye!

-- 
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick



More information about the Python-list mailing list