On this page
article
Enum Constants
Define named constants with Enum.
Category: enum
Problem
Define named constants with Enum.
Solution
class Status(Enum):
PENDING = 'pending'
DONE = 'done'
Notes
- Adapt variable names and paths to your project
- Add error handling for production use
- See related chapters in the Learning Path