[Python-Dev] file system path protocol PEP (original) (raw)

Guido van Rossum guido at python.org
Thu May 12 12:24:04 EDT 2016


I am glad this is finally happening. There's quite a bit of noise in the thread which I have to ignore. The two issues that I want to respond to are speed and whether os.fspath() can return bytes.

def fspath(p: Union[str, bytes, PathLike]) -> Union[str, bytes]: if isinstance(p, (str, bytes)): return p try: return p.fspath except AttributeError: raise TypeError(...)

Other than that I think the PEP is already in fine shape.

-- --Guido van Rossum (python.org/~guido) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20160512/dd232fdc/attachment.html>



More information about the Python-Dev mailing list