[Python-Dev] Death to string functions!

Greg Ewing greg@cosc.canterbury.ac.nz
Wed, 20 Dec 2000 11:35:05 +1300 (NZDT)


Guido:

> Boy, are you stirring up a can of worms that we've been through many
> times before!  Nothing you say hasn't been said at least a hundred
> times before, on this list as well as on c.l.py.

And I'll wager you'll continue to hear them said at regular intervals
for a long time to come, because you've done something which a lot of
people feel very strongly was a mistake, and they have some very
rational arguments as to why it was a mistake, whereas you don't seem
to have any arguments to the contrary which those people are likely to
find convincing.

> There really seem to be only two possibilities that don't have this
> problem: (1) make it a built-in, or (2) make it a method on strings.

False dichotomy. Some other possibilities:

(3) Use an operator.

(4) Leave it in the string module! Really, I don't see what
would be so bad about that. You still need somewhere to put
all the string-related constants, so why not keep the string
module for those, plus the few functions that don't have
any other obvious place?

> If " ".join(L) bugs you, try this:
>
>    space = " "	 # This could be a global
>     .
>     .
>     .
>    s = space.join(L)

Surely you must realise that this completely fails to
address Mr. Petrilli's concern?

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+