[path-PEP] Path inherits from basestring again

Bengt Richter bokr at oz.net
Mon Jul 25 16:33:47 EDT 2005


On Mon, 25 Jul 2005 17:33:51 +0200, Reinhold Birkenfeld <reinhold-birkenfeld-nospam at wolke7.net> wrote:

>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"?
-1
>"tostring"?
+1
>"tobasestring"?
-0
>
>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

Regards,
Bengt Richter



More information about the Python-list mailing list