[path-PEP] Path inherits from basestring again
Reinhold Birkenfeld
reinhold-birkenfeld-nospam at wolke7.net
Mon Jul 25 11:33:51 EDT 2005
Peter Hansen wrote:
> Reinhold Birkenfeld wrote:
>> Current change:
>>
>> * Add base() method for converting to str/unicode.
>
> Would basestring() be a better name? Partly because that seems to be
> exactly what it's doing, but more because there are (or used to be?)
> other things in Path that used the word "base", such as "basename".
>
> -1 on that specific name if it could be easily confused with "basename"
> types of things.
Right, that was a concern of mine, too.
"tobase"?
"tostring"?
"tobasestring"?
Alternative is to set a class attribute "Base" of the Path class. Or export
PathBase as a name from the module (but that's not quite useful, because I
expect Path to be imported via "from os.path import Path").
Reinhold
More information about the Python-list
mailing list