|
|
|
|
|
by brentsch
1962 days ago
|
|
A key line seems to be buried in the "Summary" at the end of the post: "Python native enums are great for what they were designed to do, but..." Barring tricks I'm unaware of, enums in other popular languages, such as Go and TypeScript, don't support the author's more complex usage either—probably by design. Out of curiosity, are there languages for which the enum implementation supports and encourages encoding complex data like this? |
|
https://doc.rust-lang.org/rust-by-example/custom_types/enum....