예제 #1
0
 def __init__(self, first, last=None, step=None):
     AllExpression.__init__(self, step)
     first = asint(first)
     last = asint(last)
     if last is None and step is None:
         last = first
     if last is not None and first > last:
         raise ValueError('The minimum value in a range must not be higher than the maximum')
     self.first = first
     self.last = last
예제 #2
0
 def __init__(self, first, last=None, step=None):
     AllExpression.__init__(self, step)
     first = asint(first)
     last = asint(last)
     if last is None and step is None:
         last = first
     if last is not None and first > last:
         raise ValueError(
             'The minimum value in a range must not be higher than the maximum'
         )
     self.first = first
     self.last = last
예제 #3
0
 def __init__(self, step=None):
     self.step = asint(step)
     if self.step == 0:
         raise ValueError('Increment must be higher than 0')
예제 #4
0
 def __init__(self, step=None):
     self.step = asint(step)
     if self.step == 0:
         raise ValueError('Increment must be higher than 0')