Re:We don’t use Python native enums
by habitue on Friday January 29, 2021 @09:58PM
(#25965580)
Often called sum types, it's really convenient when your language supports both building these kinds of enums as well as destructuring them with pattern matching.
If you don't have destructuring, they're less attractive. There's a proposal to add destructuring to python[1] so we'll see
If you don't have destructuring, they're less attractive. There's a proposal to add destructuring to python[1] so we'll see
[1] https://www.python.org/dev/peps/pep-0634/