[Python-Dev] Adding the 'path' module (was Re: Some RFE for review) (original) (raw)
Just van Rossum just at letterror.com
Tue Jun 28 11:41:36 CEST 2005
- Previous message: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)
- Next message: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Phillip J. Eby wrote:
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().stmtime et al. Alternately, I'd be okay with creating lastmodified(), lastaccessed(), and createdon() methods that return datetime objects, as long as there's also atime()/mtime()/ctime() methods that return timestamps.
My issues with the 'path' module (basically recapping what I've said on the subject in the past):
- It inherits from str/unicode, so path object have many str methods that make no sense for paths.
- On OSX, it inherits from str instead of unicode, due to http://python.org/sf/767645
- I don't like div overloading for join().
Just
- Previous message: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)
- Next message: [Python-Dev] Adding the 'path' module (was Re: Some RFE for review)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]