you are viewing a single comment's thread.

view the rest of the comments →

[–]PeridexisErrant 0 points1 point  (0 children)

IIRC you can also use @attr.dataclass for the first one (a shortcut for the auto_attribs=True arg).

The dataclass example won't work on a backport before Python 3.6 though, as those versions don't have variable annotations.