[Python-Dev] Re: [Python-Dev] String methods... finally

Tim Peters tim_one at email.msn.com
Tue Jun 15 17:58:48 CEST 1999

>>     space = " "
>>     foo = L"foo"
>>     bar = L"bar"
>>     result = space.join((foo, bar))

> The same should happen as for L"foo" + " " + L"bar".

Then " ".join([" ", 42]) should blow up, and auto-conversion for non-string
types needs to be removed from the implementation.

The attraction of auto-conversion for me is that I had never once seen
string.join blow up where the exception revealed a conceptual error; in
every case conversion to string was the intent, and an obvious one at that.
Just anal nagging.  How about dropping Unicode instead <wink>?

Anyway, I'm already on record as saying auto-convert wasn't essential, and
join should first and foremost make good sense for string arguments.

off-to-work-ly y'rs  - tim

More information about the Python-Dev mailing list