[Python-Dev] The path module PEP

Tony Meyer t-meyer at ihug.co.nz
Thu Jan 26 05:03:00 CET 2006


[Gustavo J. A. M. Carneiro]
> Plus, the names are full of redundancy.  Why abspath(), joinpath(),
> realpath(), splitall()?  Why not instead: absolute(), join(), real(),
> split() ?  Remember that they are all methods of a Path class, you  
> don't
> need to keep repeating 'path' all over the place.

+1 for all of those that aren't also string methods.

+0.9 for those that are string methods, although I suppose this  
depends on how much like a string a Path ends up like.

Other than join() (covered in the __div__ discussion), split() is an  
interesting case, since the default split-on-whitespace (str.split)  
doesn't make a whole lot of sense with a Path, but split-on-pathsep  
(os.path.split) does.  Does it make sense to be able to split a path  
on something else (like str.split), or should people just convert to/ 
from a string?  Should there be a maxsplit argument?

=Tony.Meyer


More information about the Python-Dev mailing list