On 04/08/2016 09:04 AM, Chris Barker wrote: > On Fri, Apr 8, 2016 at 2:50 AM, Nick Coghlan wrote: >> Method, as long as there's a helper function somewhere > > what has the helper function got to do with whether it's a method or > attribute (would we call a property an attribute here?) > >> Built-in? (name is dependent on #1 if we add one) > > os.fspath (alongside os.fsencode and os.fsdecode) > > [...] this is only going to be used by the stdlib and other > path-using libraries, not user code -- is that that hard to > call obj.__fspath__() ? 1) user code may call it 2) folks who write libraries are still users ;) 3) using __dunder__s directly is usually poor form. > I thought the whole point off all this is that not any old string can be > a path! (whereas any int can be an index). Unless we go with Chris A's > suggestion that this be a more generic lossless string protocol, rather > than just for paths. That does seem to be a valid point against str.__fspath__. -- ~Ethan~
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4