I\'m trying to sublclass Path from pathlib, but I failed with following error at instantiation
from pathlib import Path
class Pl(Path):
def __init__(self
I solved it. Mokey patching is the way to go.
define functions just like this
def method1(self, other):
blah
Path.method1 = method1
The fastest, easiest, most convenient solution, zero downsides. Autosuggest in Pycharm works well.
UPDATE:
I got THE solution (works with linter and auto suggestor):
class MyPath(type(Path()), Path):
pass