[path-PEP] Path inherits from basestring again

Peter Hansen peter at engcorp.com
Mon Jul 25 18:02:50 CEST 2005

Reinhold Birkenfeld wrote:
 > Peter Hansen wrote:
 >> Would basestring() be a better name?

 > "tobase"?
 > "tostring"?
 > "tobasestring"?

Of these choices, the latter would be preferable.

 > 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").

I don't understand how that would work.  An attribute on the *class*? 
What would it be, a callable?  So mypath.Base(mypath) or something? 
Please elaborate...

What about just .basestring, as a read-only attribute on the Path object?


More information about the Python-list mailing list