SpecialistOff.NET / Вопросы / Статьи / Фрагменты кода / Резюме / Метки / Помощь / Файлы

Назад

The State Class


Метки: python

The State class is distinctly different from before, since it is really just a placeholder with a name. Thus it is not inherited from previous State classes:

# StateMachine/stateMachine2/State.py

class State:
    def __init__(self, name): self.name = name
    def __str__(self): return self.name