[Python-checkins] CVS: python/dist/src/Lib string.py,1.46,1.47
Greg Ewing
greg at cosc.canterbury.ac.nz
Mon Feb 21 23:06:54 EST 2000
Oh, no, nooo, nooooooo...
Is there time to stop this madness?
Adrian Eyre wrote:
>
> It doesn't feel like join is an instance method of a string.
I agree wholeheartedly: "".join(x) is just awfully
horribly awful! PLEASE don't implement it that way!
If you want to make join() easier to get at, make
it a built-in function. If you do that you'll probably
want to generalise the types it works on somewhat,
though. Convert them to strings, or concatenate them
using whatever '+' does on that type, or something.
Whatever you do, don't stuff it onto some arbitrary
type just for the sake of making it a method. Not
everything has to be a method... the world will not
end if there are some non-method functions left in
Python 1.6...
--
Greg Ewing, Computer Science Dept,
+--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg at cosc.canterbury.ac.nz +--------------------------------------+
More information about the Python-list
mailing list