6 Oct
2006
6 Oct
'06
6:38 a.m.
Steve Holden wrote:
instance.method(*args) <==> type.method(instance, *args)
You can nowadays spell this as str.join("", lst) - no need to import a whole module!
except that str.join isn't polymorphic:
str.join(u",", ["1", "2", "3"]) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: descriptor 'join' requires a 'str' object but received a 'unicode' string.join(["1", "2", "3"], u",") u'1,2,3'
</F>