[Python-Dev] Adding the 'path' module (was Re: Some RFE forreview)

Tony Meyer t-meyer at ihug.co.nz
Mon Jun 27 02:58:50 CEST 2005


[Reinhold Birkenfeld]
>>>> One more issue is open: the one of naming. As "path" is already
>>>> the name of a module, what would the new object be called to
>>>> avoid confusion? pathobj?  objpath? Path?

[Michael Hoffman]
>>> I would argue for Path.

[Tony Meyer
>> Granted "path" is actually os.path, but I don't think it's 
>> wise to have stdlib modules whose names are differentiated only
>> by case, especially on Windows (and other case-insensitive
>> filesystems).

[Phillip J. Eby]
> This is the name of a *class*, not a module.

Sorry - it sounded like the idea was to put this class in a module by itself
(i.e. the class would be os.Path.Path).

> I.e., we are discussing 
> adding a Path class to the 'os' module, that implements the 
> interface of the "path" module.

In that case, I would argue against Path as the name of the class because
it's confusing to have "os.path" be the path module, and "os.Path" be an
class that provides an interface to that module.

I think differentiating things solely on the case of the name is a bad idea.

=Tony.Meyer



More information about the Python-Dev mailing list