[path-PEP] Path inherits from basestring again

skip at pobox.com skip at pobox.com
Mon Jul 25 18:41:08 CEST 2005


    Reinhold> Right, that was a concern of mine, too.
    Reinhold> "tobase"?
    Reinhold> "tostring"?
    Reinhold> "tobasestring"?

If we're on a filesystem that understands unicode, would somepath.tostring()
return a unicode object or a string object encoded with some
to-be-determined encoding?

Why not just add __str__ and __unicode__ methods to the class and let the
user use str(somepath) or unicode(somepath) as needed?

Or am I missing something fundamental about what the base() method is
supposed to do?

Skip



More information about the Python-list mailing list