News for hackers. Stuff that matters.
Re:Using Enumerated Types in Python by zem on Saturday June 06, 2020 @04:25PM (#23441974)
there are several benefits to using named constants over literal strings, and enums give you namespaced named constants
Re:Using Enumerated Types in Python by nerdponx on Saturday June 06, 2020 @05:41PM (#23442461)
Not only that, but both static type-checking (with appropriate tooling) and convenient runtime membership checks.