Enums in Python: Step-by-Step Guide
Python enumerations or Enums can be used to couple related values together in a type-safe way. For example, here is an enumeration of directions: This makes it possible to call Direction.UP or Direction.DOWN in your program. Notice that Python enumerations have nothing to do with the enumerate() function. If you came for enumerate() check out this article. Python […]
Enums in Python: Step-by-Step Guide Read More »