String.join revisited (URGENT for 1.6)

Martijn Faassen m.faassen at vet.uu.nl
Tue May 30 07:21:25 EDT 2000


Fredrik Lundh <effbot at telia.com> wrote:
> Greg Ewing wrote:
>> Bugs can be fixed at any time. But if we don't speak up soon
>> before what we see as a serious aesthetic mistake becomes
>> entrenched, it will be too late.

> if you think that keeping string.join in there is the most serious
> design mistake in 1.6, you may be in for some really interesting
> surprises...

That of course doesn't make it any less true that we should stop 
" ".join() *now* before it is too late. If there are other more serious
design mistakes, I suggest you point them out to us if you want our
help fixing them. :)

Since the debate about generalized 'join()' on lists can be fought on forever,
what about following the earlier more pragmatic suggestion of somehow hiding
'join()' on strings and exposing it only through string.join(), making
that the One Right Way to Do It? If 'string' suddenly is a pain to import,
a builtin: sjoin() or whatever.

" ".join() is just not making sense to a *lot* of people. I'm sure you
can get used to it, but I had to blink a couple of hundred times first, myself.

Regards,

Martijn
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list