String.join revisited (URGENT for 1.6)

Gordon McMillan gmcm at hypernet.com
Sat Jun 3 17:35:20 EDT 2000


Juergen A. Erhard <jae at ilk.de> wrote:

>The other objection was that [].join would be 'lists and tuples are
>*heterogeneous* containers. you can put *any* kind of Python 
object in
>them, not just strings' (as quoted from a mail by the effbot).
>
>Which is a non-argument... the exact same thing can be said 
against
>string.join(list, sep).  So why should list.join(sep) not simply do
>the same thing for non-strings that string.join(list, sep) does and
>raise an TypeError exception?[1]

Because it's a "internal state" error, not a "bad argument" error.

This whole friggin' thread is a *bad argument* error....

- Gordon




More information about the Python-list mailing list