On 04/14/2016 12:03 AM, Michael Mysinger via Python-Dev wrote: > Brett Cannon writes: > After playing with and considering the 4 possibilities, anything where > __fspath__ can return bytes seems like insanity that flies in the face of > everything Python 3 is trying to accomplish. In particular, one RichPath > class might return bytes and another str, or even worse the same class might > sometimes return bytes and sometimes str. When will os.path.join blow up due > to mixing bytes and str and when will it work in those situations? What are you asking here? Exactly where in os.join mixing bytes & str the exception will occur, or will mixing bytes & str ever work? The answer to the first is irrelevant (except for performance). The answer to the second is always/never. Meaning allowing os.fspath() and __fspath__ to return either bytes or str will never cause the combination of bytes and str to work. Said another way: if you are using os.path.join then all the pieces have be str or all the pieces have to be bytes. -- ~Ethan~
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