[Python-3000] Automatically invoking str() in str.join()

Barry Warsaw barry at python.org
Thu Apr 27 19:12:35 CEST 2006


On Thu, 2006-04-27 at 10:08 -0700, Aahz wrote:

> While I hate the way it looks, I never have gotten mixed up about the
> order of arguments since switching to ''.join(l).

Which is why

EMPTYSTRING = ''

...

EMPTYSTRING.join(seq)

looks much better.  But hey, yeah, a join() builtin would be fine if it
took the string arg first, so that

''.join(seq) == join('', seq)

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 309 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-3000/attachments/20060427/5f321fab/attachment.pgp 


More information about the Python-3000 mailing list