We don’t use Python native enums
kodare.net
kodare.net
Out of curiosity, are there languages for which the enum implementation supports and encourages encoding complex data like this?
Look how they encode planetary data into the enum of the Solar system planets.
https://doc.rust-lang.org/rust-by-example/custom_types/enum....
[0] https://www.reddit.com/r/rust/comments/l594zl/everywhere_i_g...
If you don't have destructuring, they're less attractive. There's a proposal to add destructuring to python[1] so we'll see
Juse use Python's `dataclass` or similar (`pydantic` is great) and just build the custom data types that you need.
Personally I’ve never needed to use the Enum class, ever, in the last five years of Python development. It takes barely any time to implement a custom replacement if you need one, but for 99% of my use cases a dictionary or tuple has been enough.
So yes you can always use something else just like all the fold/zip/map can be replaced with also something else ;)