[Python-Dev] PEP 290 revisited
Guido van Rossum
guido@python.org
Thu, 09 Jan 2003 01:20:17 -0500
> I'm in the process of cleaning up string module references in wxPython.
>
> I decided to take a look at the 2.3a1 release and it appears that
> Python and the standard libs need a similar cleanup.
I thought we already eradicated most uses of the string module;
whatever's left is probably due to PEP 291.
But in any case, I'm against these kinds of peephole changes.
Historically they have often introduced subtle bugs due to the sheer
volume of changes. Also, these changes complicate code audits using
cvs annotate when you need to understand who wrote a particular line
of code, and why.
If you want to help, pick one module at a time (it must be a module
that you know and use) and do a thorough style review on *all* aspects
of the module. E.g. add docstrings, make sure docstrings conform to
PEP 8, use the latest builtins where it makes sense, use nested scopes
if it would clarify things, etc. Also do a thorough review of the
module's test suite, making sure that all end cases are tested and
that all code in the module is actually tested (use coverage tools!),
adding tests when necessary.
I know, that's much less fun and no quick satisfaction, but it leads
to code *improvement* rather than bitrot.
--Guido van Rossum (home page: http://www.python.org/~guido/)