Post #2873745
2026-05-25 18:54 UTC
python gotcha i just lost most of an hour to: dataclass objects will happily let you assign values to attributes that you didn't specify using type annotations in the class definition, unless you specify slots=True in the arguments to the class definition's @dataclass decorator. (for some reason i assumed that doing a typo on a dataclass object's attribute name would raise an exception, but actually no)
Replies (0)
No replies.