[issue24132] Direct sub-classing of pathlib.Path

Stephen M. Gava report at bugs.python.org
Tue Nov 7 20:01:39 EST 2017


Stephen M. Gava <elguavas at python.net> added the comment:

Using a set of paths with special properties and formats in a project, thought "the cleanest oop way to do this is try out python's oop paths in pathlib". Subclassed Path to implement my extra (non platfor specific) properties and fell at the first hurdle because of this issue... 

for me pathlib does not provide oop paths if i can't subclass Path, for whatever reason.

reverted to treating paths as strings and writing functions to handle my special path properties and formats.

i was also surprised when i found another bug report on this issue that said it was closed for 3.7, great i thought this has been solved, but no, the other report was closed because it was about the same issue as this ancient report.

----------
nosy: +elguavas

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


More information about the Python-bugs-list mailing list