bootstrap-vz/base/phase.py
2013-07-08 23:13:59 +02:00

21 lines
406 B
Python

from functools import total_ordering
@total_ordering
class Phase(object):
description = None
def __init__(self):
pass
def __lt__(self, other):
from common.phases import order
return order.index(self) < order.index(other)
def __eq__(self, other):
return self == other
def __str__(self):
return '{name}'.format(name=self.__class__.__name__)
def __repr__(self):
return self.__str__()