I cannot believe that the current representation is so
bad and has been for so long and nobody, really nobody, has anything
done about it.
[...] pathlib.Path is a better representation of a path than a plain string and that strings on their own are nothing that special in terms of representing a string that demands we defend it on its own grounds as such.
I think most "practicality beats purity" folks don't want that either.
They are just bloody lazy. They actually want the benefits of both, the
pure datastructure with its convenience methods and the dirty str-like
thing with its convenience methods.
People don't like it when somebody takes one bag of convenience away
from them if they easily can have both. ;-)
That's fine, but I also don't want to have the worry of latent bugs lurking in code either due to implicit type compatibility and so that clashes in this instance.
Sure, but that doesn't mean the situation can't be improved. You can also get the string out of Path objects to hack on, but that doesn't mean you should be shipping paths around in your code as strings either. I'm not saying you *can't* use strings to represent a path, just that it isn't the best option available from a higher-level perspective.
Selling pathlib with the "getattr(path, 'path', path)" idiom is not
going to help those fellows. I mean, are you serious? It looks
ridiculous. :-/
I disagree.
I suspect simple fixes like updating the docs and using `getattr(p, 'path', p)` in the right places will be the kind of quick fixes the GitHub migration will encourage.