2016-04-11 21:00 GMT+02:00 Brett Cannon <brett at python.org>: > I'm -0 on allowing __fspath__ to return bytes, but we can see what others > think. 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(). A "byte string" is unclear in Python. There is the immutable "bytes" type. But there is also the mutable "bytearray" type. And the buffer protocol which can have different shapes. I like the idea of a simple protocol: only allow a single type, str. Victor
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