[Python-3000] cleaning up *path.py code duplication

Jack Diederich jackdied at jackdied.com
Sat Aug 26 02:19:23 CEST 2006


While checking find() uses in the stdlib I noticed that the various
path modules have duplicate code and docstrings for some generic path
manipulations.  Delightfully they even have different implementations
and docstrings for identical functions. splitext() is a great bad
example - os2emxpath.splitext() builds up strings by doing char-by-char
concatenations where everyone else uses find() + slice.

If there are no objections I'll move these into a module named 
genericpath.py and change the others to do

from genericpath import func1, func2, funcN

where applicable.

So, any objections? Should it be a 2.6 backport too?

-Jack


More information about the Python-3000 mailing list