[Python-Dev] File system path PEP, part 2
Joseph Martinot-Lagarde
contrebasse at gmail.com
Fri May 13 10:23:09 EDT 2016
More information about the Python-Dev mailing list
Fri May 13 10:23:09 EDT 2016
- Previous message (by thread): [Python-Dev] File system path PEP, part 2
- Next message (by thread): [Python-Dev] File system path PEP, part 2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> - there is no os function that returns "str or bytes, I don't > care which". (If you really need that, call __fspath__ directly.) os.fspath() in the PEP works when given str or bytes directly, but those don't have a __fspath__ method, so directly calling the dunder method is not equivalent to calling os.fspath(). The whole point of having os.fspath() is to pass str or paths (or bytes) and get an appropriate object for lew-level functions.
- Previous message (by thread): [Python-Dev] File system path PEP, part 2
- Next message (by thread): [Python-Dev] File system path PEP, part 2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list