[Python-Dev] Re: ''.join() again

François Pinard pinard@iro.umontreal.ca
21 Apr 2003 13:44:12 -0400


[Aahz]

> Well, [...] I still hate ''.join().  [...] I'll never change my mind
> about its visual ugliness,

Same here.  I'm getting used to it like children get use to cigars: they
vomit for some time, and after a while, learn to like them.  Cigars, like
the construct above, still destroy taste, and are not ideal for health! :-)

> I've got to admit that it has one cardinal virtue: you can never forget
> what order its arguments belong in.

But yet, it is so unnatural and brain damaging that it sometimes induces me
into using the wrong order of arguments for `A.split(B)'.

I tried complaining as loud as I could, while staying civilised, before the
above was put into Python, but nobody seemed interested to listen.  As much
as I appreciate most additions to Python from 1.6 and on, that particular
one has been and will stay a long lasting mistake.  I still love Python! :-)

[Barry Warsaw]

> And I'll do my semi-regular rant that 
> 	COMMASPACE.join(seq)
> looks a lot nicer than
> 	', '.join(seq)
> even to the point of starting to /like/ this idiom. :)

Having to name simple string constants like a single space looks overkill.
It hardly salvages the original ugliness.  Admit it: you're stuck! :-)

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard