[Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()
Ethan Furman
ethan at stoneleaf.us
Tue Apr 12 12:37:13 EDT 2016
More information about the Python-Dev mailing list
Tue Apr 12 12:37:13 EDT 2016
- Previous message (by thread): [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()
- Next message (by thread): [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 04/12/2016 09:20 AM, Chris Angelico wrote: > On Wed, Apr 13, 2016 at 2:15 AM, Ethan Furman >> latin1? I thought latin1 had a code point for 0-255, so how could using it >> raise an encoding error? > > Latin-1 / ISO-8859-1 defines a character for every byte, so any byte > string will *decode*. It only defines 256 characters as having > equivalent bytes, though, so *encoding* can fail. Ah, right -- so if you start with bytes it cannot fail, if you start with a string it can. -- ~Ethan~
- Previous message (by thread): [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()
- Next message (by thread): [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list