join [was: Re: converting an array of chars to a string]
Delaney, Timothy
tdelaney at avaya.com
Mon Jul 8 21:38:48 EDT 2002
> From: pinard at iro.umontreal.ca [mailto:pinard at iro.umontreal.ca]
>
> [Duncan Booth]
>
> > Writing ''.join(list) still sucks though.
>
> JOINER.join(LIST) has some technical advantages, which are
> much bolded by
> its proponents. Despite theses advantages, it just remains
> plain ugly.
Very much - ugly and unintuitive.
There are times that functions are better than methods. IMO this is one of
those times. I have been using 2.0+ for quite a while now, and have yet to
use ''.join() in preference to string.join(). Sure - I may suffer a slight
performance decrease - but my code is a lot more readable.
Tim Delaney
More information about the Python-list
mailing list