Re:Using Enumerated Types in Python
by nerdponx on Saturday June 06, 2020 @05:46PM
(#23442506)
What's the basic idea here? That instead of ints or strings, your enum values themselves are instances of custom classes with whatever behavior you want?
[ Parent
| on HN ]
If I would describe the use-case:
If you use switches with enums for functionality, this is a better way ( personal opinion). Since Enums quickly need more than 1 switch and this could wrap that behaviour
Your description is also pretty good