I have something which can be in three states
(say) Open, Closed, Running
I will try to model it via one of the two ways,
is_open = Boolean(default=False)
is_running = Boolean(default=False)
and Disallow the state (say) is_running=True, is_open = False in application code.
I can also try
state=Char(choices=("O", "C", "R"))
Is one of the ways better, and is there any better way to do this?
Edit: I am using Python (and Django).
Edit 2: After reading the answers below, I guess I am trying to simulate Enums in Python(Which doesnt have them) in a form which is suitable for persisting to DB