Lines Matching refs:x
34 def __new__(cls, x=0): argument
35 if isinstance(x, Int):
36 return x
37 if isinstance(x, str):
39 x = int(x, 0)
42 if re.match('^\s*\+?\s*(?:∞|inf)\s*$', x):
43 x = m.inf
44 elif re.match('^\s*-\s*(?:∞|inf)\s*$', x):
45 x = -m.inf
48 assert isinstance(x, int) or m.isinf(x), x
49 return super().__new__(cls, x)
52 if self.x == m.inf:
54 elif self.x == -m.inf:
57 return str(self.x)
60 assert not m.isinf(self.x)
61 return self.x
64 return float(self.x)
74 new = self.x if self else 0
75 old = other.x if other else 0
85 new = self.x if self else 0
86 old = other.x if other else 0
101 return self.__class__(self.x + other.x)
104 return self.__class__(self.x - other.x)
107 return self.__class__(self.x * other.x)
514 ' '.join('%*s' % (w, x)
515 for w, x in zip(widths[1:], line[1:-1])),
654 type=lambda x: (lambda k,v: (k, set(v.split(','))))(*x.split('=', 1)),
692 type=lambda x: x.split(),
698 type=lambda x: x.split(),