Closed jstriebel closed 5 years ago
@fm3 I used dataclass
now, which perfectly fits our needs. If it's used with frozen=True
, it also defines __hash__
, and it has a __post_init__
hook :tada:
I also sneaked in abstract base classes here.
Could you have a second glance with the changes?
Yes I like that a lot better :) Thanks!
Using namedtuple we get rid of some boilerplate code, also this should be more efficient. Unfortunately we loose the assertion checks for now, see https://github.com/python/typing/issues/526