[issue41109] subclasses of pathlib.PurePosixPath never call __init__ or __new__

Étienne Pot report at bugs.python.org
Sat Aug 8 06:34:16 EDT 2020


Étienne Pot <etiennefg.pot at gmail.com> added the comment:

Before solving this issue, I think it would be best to think on a more generic solution on how to make Pathlib more extensible. Related to: https://discuss.python.org/t/make-pathlib-extensible/3428

For instance, if childs created with `p.parent()`, `p / 'subdir'` need to forward some state (e.g. `RemotePath(path, password=, user=)`).

Rather than __init__, maybe there should be some __post_init__ like dataclasses.

----------

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


More information about the Python-bugs-list mailing list