[Python-Dev] Death to string functions!

Peter Funk pf@artcom-gmbh.de
Sun, 17 Dec 2000 10:59:11 +0100 (MET)


Hi,

Guido van Rossum:
> If you're saying that you think the string module is too prominent to
> ever start deprecating its use, I'm afraid we have a problem.
 
I strongly believe the string module is too prominent.

> I'd also like to note that using the string module's wrappers incurs
> the overhead of a Python function call -- using string methods is
> faster.

I think most care more about readbility than about run time performance.
For people without much OOP experience, the method syntax hurts
readability.

> Finally, I like the look of fields[i].strip().lower() much better than
> that of string.lower(string.strip(fields[i])) -- an actual example
> from mimetools.py.

Hmmmm.... May be this is just a matter of taste?  Like my preference
for '<>' instead of '!='?  Personally I still like the old fashinoned
form more.  Especially, if string.join() or string.split() are
involved.

Since Python 1.5.2 will stay around for several years, keeping backward 
compatibility in our Python coding is still major issue for us.
So we won't change our Python coding style soon if ever.  

> Ideally, I would like to deprecate the entire string module, so that I
[...]
I share Mark Lutz and Tim Peters oppinion, that this crusade will do 
more harm than good to Python community.  IMO this is a really bad idea.

Just my $0.02, Peter