[issue40752] Implement PurePath.__len__

Ram Rachum report at bugs.python.org
Sun May 24 06:43:34 EDT 2020


Ram Rachum <ram at rachum.com> added the comment:

I understand your argument. I think it relies on your earlier statement: "The fact the the path is stored as a string is an implementation detail."

This statement reminds me of the term "architecture astronaut". Pathlib builds a cool architecture over the concept of paths. But landing back in reality, all paths are strings, aren't they? On any OS, even looking at esoteric things such as UNC paths on Windows, they're all eventually strings and are treated by most tools as just strings.

If I'm missing any edge cases, let me know. But otherwise I think it's okay to look at `Path` as a string with bells and whistles.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40752>
_______________________________________


More information about the Python-bugs-list mailing list