3 ms·
Data classes and enums are the move, IMO, in python, to address the considerations of the article. Enums in particular have room for improvement, but I think th
by the__alchemist 1y ago
Data classes and enums are the move, IMO, in python, to address the considerations of the article. Enums in particular have room for improvement, but I think they're good enough. (To use in place of common python patterns like strings for choices, or sets of booleans)
- danofsteel32 1y agoThis. You can get very far with just dataclasses, enums, and functions. I use dataclasses like I would use structs in C or go.
- clickety_clack 1y agoThere’s also pyrsistent for immutable data structures with some nice methods for working with them.