3 ms·
It's a feature from the standard library. However it's only normally available in dataclass. fastcore simply brings the same functionality to other classes too.
by jph00 6y ago
It's a feature from the standard library. However it's only normally available in dataclass. fastcore simply brings the same functionality to other classes too.
- dragonwriter 6y agodataclass has __post_init__ as a mechanism for doing what you'd normally do in __init__ besides what dataclasses do in the generated __init__, because the generated __init__ means you can't do it in __init__, and otherwise you'd have to override (and replicate the function of) the generated __init__. It is not equivalent to PrePostMetaInit.