Lines Matching refs:x
25 def __new__(cls, x=0): argument
26 if isinstance(x, Int):
27 return x
28 if isinstance(x, str):
30 x = int(x, 0)
33 if re.match('^\s*\+?\s*(?:∞|inf)\s*$', x):
34 x = m.inf
35 elif re.match('^\s*-\s*(?:∞|inf)\s*$', x):
36 x = -m.inf
39 assert isinstance(x, int) or m.isinf(x), x
40 return super().__new__(cls, x)
43 if self.x == m.inf:
45 elif self.x == -m.inf:
48 return str(self.x)
51 assert not m.isinf(self.x)
52 return self.x
55 return float(self.x)
65 new = self.x if self else 0
66 old = other.x if other else 0
76 new = self.x if self else 0
77 old = other.x if other else 0
92 return self.__class__(self.x + other.x)
95 return self.__class__(self.x - other.x)
98 return self.__class__(self.x * other.x)
484 ' '.join('%*s' % (w, x)
485 for w, x in zip(widths[1:], lines[0][1:-1])),
507 ' '.join('%*s' % (w, x)
508 for w, x in zip(widths[1:], line[1:-1])),
532 ' '.join('%*s' % (w, x)
533 for w, x in zip(widths[1:], lines[-1][1:-1])),
687 type=lambda x: (lambda k,v: (k, set(v.split(','))))(*x.split('=', 1)),
725 type=lambda x: int(x, 0),