PEP on path module for standard library

Duncan Booth duncan.booth at invalid.invalid
Fri Jul 22 18:20:01 CEST 2005


Peter Hansen wrote:

> Duncan, are you another formerly non-user of path who has this opinion, 
> or have you already attempted to use path extensively in your code?

I'm a currently non-user of path who would probably use it if it were in 
the standard library but so far have been satisfied to use os.path.

> I'm not saying I dismiss the opinions of those who haven't actually 
> tried working with a string-based path object, but it's worth 
> considering that you might adopt a different opinion after using it for 
> a while.

I fully accept that. My point is simply that as a non-user, it sounds to me 
as though subclassing string is the wrong approach. I would have expected a 
path object to be a sequence of path elements rather than a sequence of 
characters. This is basically just a gut feeling though, so I'm perfectly 
happy to be told that I'm wrong.

BTW, does it matter at all in practical use that the base class of path 
varies between str and unicode depending on the platform?

John Roth wrote:
> You have to start somewhere. One of the lessons that's beginning
> to seep into people's minds is that getting something that works
> out there is almost always preferable to (over) design by committee.

Dead right, but once it goes into the standard library it has to pretty 
well stop evolving, so it needs to be right, or as close as possible before 
that happens.




More information about the Python-list mailing list