[Python-Dev] Adding the 'path' module (was Re: Some RFE for review)
Phillip J. Eby
pje at telecommunity.com
Mon Jun 27 23:25:58 CEST 2005
At 03:45 PM 6/27/2005 -0500, Skip Montanaro wrote:
>We're getting enough discussion about various aspects of Jason's path module
>that perhaps a PEP is warranted. All this discussion on python-dev is just
>going to get lost.
AFAICT, the only unresolved issue outstanding is a compromise or
Pronouncement regarding the atime/ctime/mtime members' datatype. This is
assuming, of course, that making the "empty path" be os.curdir doesn't
receive any objections, and that nobody strongly prefers 'path.fromcwd()'
over 'path.cwd()' as the alternate constructor name.
Apart from these fairly minor issues, there is a very short to-do list,
small enough to do an implementation patch in an evening or
two. Documentation might take a similar amount of time after that; mostly
it'll be copy-paste from the existing os.path docs, though.
As for the open issues, if we can't reach some sane compromise about
atime/ctime/mtime, I'd suggest just providing the stat() method and let
people use stat().st_mtime et al. Alternately, I'd be okay with creating
last_modified(), last_accessed(), and created_on() methods that return
datetime objects, as long as there's also atime()/mtime()/ctime() methods
that return timestamps.
More information about the Python-Dev
mailing list