コード例 #1
0
ファイル: iso8601.py プロジェクト: rbaumert/cylc
 def standardise(self):
     """Format self.value into a standard representation."""
     try:
         self.value = str(interval_parse(self.value))
     except ValueError:
         raise IntervalParsingError(type(self), self.value)
     return self
コード例 #2
0
ファイル: integer.py プロジェクト: DamianAgius/cylc
 def __init__(self, value):
     if (not isinstance(value, basestring)
             or not REC_INTERVAL.search(value)):
         raise IntervalParsingError("IntegerInterval", repr(value))
     super(IntegerInterval, self).__init__(value)