예제 #1
0
 def standardise(self):
     """Format self.value into a standard representation."""
     try:
         self.value = str(interval_parse(self.value))
     except IsodatetimeError:
         raise IntervalParsingError(type(self), self.value)
     return self
예제 #2
0
파일: integer.py 프로젝트: lparkes/cylc
 def __init__(self, value):
     if (not isinstance(value, str) or
             not REC_INTERVAL.search(value)):
         raise IntervalParsingError("IntegerInterval", repr(value))
     super(IntegerInterval, self).__init__(value)