[Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()

Ethan Furman ethan at stoneleaf.us
Mon Apr 11 20:40:50 EDT 2016

On 04/11/2016 01:42 PM, Victor Stinner wrote:

> With the PEP 383, a bytes filename can be stored as str using the
> surrogateescape error handler. So DirEntry can convert a bytes path to
> str using os.fsdecode().

Does this mean that os.fsdecode() is simply a wrapper that sets the 
errors to the surrogateescape handler?



More information about the Python-Dev mailing list