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

Zack Weinberg zack@codesourcery.com
Mon, 21 Apr 2003 11:08:56 -0700


Barry Warsaw <barry@python.org> writes:

> OTOH, I wouldn't object too strenuously to a join() builtin, but I'd
> probably never use it -- I'm sure I'd rarely remember the argument order
> and hate having too look it up much more than writing out the current
> spelling.  Admit it: there is no natural unforgetable order! :)

It occurs to me that one may put

join = str.join

at the top of one's module, and thereafter use

join('str', sequence)

(For 2.1 backward compatibility, use type('') instead of str.)

Possibly this is a counterargument to accusations that a join builtin
would be bloat, since the same implementation could be used for both.

zw