2 ms·
I think the difficulty here is that data classes beyond the most simple cases have awkward extension points, see the docs on post-initialization https://docs.py
by rtpg 4y ago
I think the difficulty here is that data classes beyond the most simple cases have awkward extension points, see the docs on post-initialization https://docs.python.org/3/library/dataclasses.html#post-init-processing https://docs.python.org/3/library/dataclasses.html#post-init...
I am partial to a dataclass keyword but… it’s tough. The problem with declarative stuff like this is that sometimes you really just want to do things in a certain order and now you have to communicate that (the keyword argument hack is an example of this)