Lines Matching refs:x
30 def __new__(cls, x=0): argument
31 if isinstance(x, Int):
32 return x
33 if isinstance(x, str):
35 x = int(x, 0)
38 if re.match('^\s*\+?\s*(?:∞|inf)\s*$', x):
39 x = m.inf
40 elif re.match('^\s*-\s*(?:∞|inf)\s*$', x):
41 x = -m.inf
44 assert isinstance(x, int) or m.isinf(x), x
45 return super().__new__(cls, x)
48 if self.x == m.inf:
50 elif self.x == -m.inf:
53 return str(self.x)
56 assert not m.isinf(self.x)
57 return self.x
60 return float(self.x)
70 new = self.x if self else 0
71 old = other.x if other else 0
81 new = self.x if self else 0
82 old = other.x if other else 0
97 return self.__class__(self.x + other.x)
100 return self.__class__(self.x - other.x)
103 return self.__class__(self.x * other.x)
462 ' '.join('%*s' % (w, x)
463 for w, x in zip(widths[1:], line[1:-1])),
609 type=lambda x: (lambda k,v: (k, set(v.split(','))))(*x.split('=', 1)),
646 type=lambda x: x.split(),