adapy icon indicating copy to clipboard operation
adapy copied to clipboard

Use dataclasses where possible

Open Krande opened this issue 3 years ago • 1 comments

Move to using dataclasses wherever possible to improve general readability of classes

Krande avatar Oct 01 '22 08:10 Krande

Note to self.

Dataclasses + inheritance is not ideal since you loose control of re-ordering of positional arguments for subclasses. I.e. the primary data for Beam , Plate etc. classes would have to only rely on keyword arguments, which does not appear to be ergonomically appealing

Krande avatar Oct 12 '22 08:10 Krande

Having seen the limitations of kwarg ordering of inherited subclasses when using dataclasses, this is considered (at the time of writing) not applicable

Krande avatar Feb 17 '23 17:02 Krande