2 ms·
You could attach the __init__ method to dataclass (as if it were a class) and call it like this, couldn't you? dataclass.__init__(self, **kw) Like in the ol
by ptx 9y ago
You could attach the __init__ method to dataclass (as if it were a class) and call it like this, couldn't you?
dataclass.__init__(self, **kw)
Like in the olden days before super().
- dragonwriter 9y agoFrom the description, the dataclass decorator generates an __init__ method for the decorated class, which seems different than using a common generic __init__ method for all classes with the decorator.