Re: [path-PEP] Path inherits from basestring again
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: [path-PEP] Path inherits from basestring again

From: Reinhold Birkenfeld <reinhold-birkenfeld-nospam@wolke7.net>
Date: Mon Jul 25 2005 - 17:33:51 CEST

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
Received on Thu Sep 29 17:09:37 2005