[State] State pattern with Python