2013-06-23 17:54:25 +02:00
|
|
|
from functools import total_ordering
|
2013-06-23 15:26:08 +02:00
|
|
|
|
2013-06-23 17:54:25 +02:00
|
|
|
@total_ordering
|
2013-06-23 15:26:08 +02:00
|
|
|
class Phase(object):
|
|
|
|
description = None
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
pass
|
|
|
|
|
2013-06-23 17:54:25 +02:00
|
|
|
def __lt__(self, other):
|
2013-06-23 15:26:08 +02:00
|
|
|
from common.phases import order
|
2013-06-23 17:54:25 +02:00
|
|
|
return order.index(self) < order.index(other)
|
|
|
|
|
|
|
|
def __eq__(self, other):
|
|
|
|
return self == other
|
2013-06-23 15:26:08 +02:00
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return '{name}'.format(name=self.__class__.__name__)
|
2013-06-23 17:54:25 +02:00
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
return self.__str__()
|