On 29 March 2016 at 12:24, Sven R. Kunze firstname.lastname@example.org wrote:
On 29.03.2016 13:21, Steven D'Aprano wrote:
So if I have a Linux file b'\xD8\x01', I can't create a path object to work with it.
I actually like this limitation. It forces a cleaner API and cleaner code as it is the one way.
However, it does mean that certain use cases are not supported by pathlib. One of the constant issues with core/stdlib development is having to consider how the design affects people with needs you don't personally have. This one's not such a big problem "pathlib doesn't support non-Unicode filenames" is a simple enough to express limitation. But that doesn't help the poor guy debugging an issue with his filesystem-scanning program where a user has a mangled non-Unicode filename somewhere in the bowels of his profile - does he declare that user's situation is unsupported, or does he abandon pathlib in favour of the old os APIs? (And if the , what's the likelihood