Improving Python (was: Lambda going out of fashion)
fredrik at pythonware.com
Mon Dec 27 09:50:36 CET 2004
Dima Dorfman wrote:
> I happen to not mind the ''.join syntax, but if I did, I would use
> str.join('', seq)
> which is just like a join builtin except that it's not as easy to make
> it work on pre-string-method Pythons.
just like join, except that it isn't:
>>> string.join(seq, sep)
>>> str.join(sep, seq)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: descriptor 'join' requires a 'str' object but received a 'unicode'
More information about the Python-list