[Python-Dev] Pathlib enhancments - method name only

Ethan Furman ethan at stoneleaf.us
Fri Apr 8 14:13:47 EDT 2016


On 04/08/2016 10:46 AM, Koos Zevenhoven wrote:
 > On Fri, Apr 8, 2016 at 7:42 PM, Chris Barker  wrote:
 >> On Fri, Apr 8, 2016 at 9:02 AM, Koos Zevenhoven wrote:

 >>> I'm still thinking a little bit about 'pathname', which to me sounds
 >>> more like a string than fspath does.
 >>
 >>
 >> I like that a lot - or even "__pathstr__" or "__pathstring__"
 >> after all, we're making a big deal out of the fact that a path is
 >> *not a string*, but rather a string is a *representation* (or
 >> serialization) of a path.

That's a decent point.

So the plausible choices are, I think:

- __fspath__  # File System Path -- possible confusion with Path

- __fsstr__   # File System String

- __fspathstr__ # File System Path String -- zero ambiguity, but
                 # what a mouthful

--
~Ethan~


More information about the Python-Dev mailing list