| > Python doesn't work well with file names in principle: it wants everything to be Unicode. That works for many, but if you want reliable code... you just have to throw all of that away. Windows' APIs use UTF-16 and most file name encodings on Linux are UTF-8. How should Python handle this better? > Also, in case of pathlib, it adds no value on top of os.path of which it is a wrapper. Completely disagree. os.path is annoying to use. Treating paths as objects with methods and joining them with / makes my life much easier. > increasing the size and memory footprint of "standard" library By a ridiculous amount. pathlib is just another pure Python module with a bunch of simple functions and classes. [1] > complicating dispatch and therefore debugging You can simply declare and accept `Union[str, os.PathLike]` and convert the paths to whatever you want at the entrypoints, then use that in your own project. Where is the complexity? I've never seen this make debugging harder, it's just an additional type. [1] https://github.com/python/cpython/blob/d9fc15222e96942e30ea8... |
You just repeated what I said. Just read it again. You already know the answer, you just need to understand it.
> Completely disagree.
And make no worthwhile argument.
> You can simply declare and accept `Union[str, os.PathLike]`
What does this have to do with debugging? Do you know what "debugging" means?