[Python-Dev] The path module PEP (original) (raw)
Tony Meyer t-meyer at ihug.co.nz
Thu Jan 26 05:03:00 CET 2006
- Previous message: [Python-Dev] The path module PEP
- Next message: [Python-Dev] The path module PEP
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[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
- Previous message: [Python-Dev] The path module PEP
- Next message: [Python-Dev] The path module PEP
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]