Methods vs. Functions (Re: [Python-Dev] A house upon the sand)
Tue, 28 Nov 2000 10:21:30 +0100
Guido van Rossum wrote:
> But join() is special: it is polymorphic in two arguments, and making
> it a method of the separator argument doesn't help.
join() is special indeed, but what about the semantics we talked
about last year (?)...
join(seq, sep) := seq + sep + seq + sep + ... + seq[n]
This should fit all uses of join() (accept maybe os.path.join).
How about naming the beast concat() with sep defaulting to '' to
avoid the problems with os.path.join() ?!
Python Pages: http://www.lemburg.com/python/