display.py (1049:b175a798c8d4) | display.py (1547:1f0c266940d4) |
---|---|
1class Value: 2 def __init__(self, value, precision, percent = False): 3 self.value = value 4 self.precision = precision 5 self.percent = percent 6 def __str__(self): 7 if isinstance(self.value, str): 8 if self.value.lower() == 'nan': --- 54 unchanged lines hidden (view full) --- 63 print self 64 65class VectorDisplay: 66 def display(self): 67 p = Print() 68 p.flags = self.flags 69 p.precision = self.precision 70 | 1class Value: 2 def __init__(self, value, precision, percent = False): 3 self.value = value 4 self.precision = precision 5 self.percent = percent 6 def __str__(self): 7 if isinstance(self.value, str): 8 if self.value.lower() == 'nan': --- 54 unchanged lines hidden (view full) --- 63 print self 64 65class VectorDisplay: 66 def display(self): 67 p = Print() 68 p.flags = self.flags 69 p.precision = self.precision 70 |
71 if issequence(self.value): | 71 if isinstance(self.value, (list, tuple)): |
72 if not len(self.value): 73 return 74 75 mytotal = reduce(lambda x,y: float(x) + float(y), self.value) 76 mycdf = 0.0 77 78 value = self.value 79 --- 45 unchanged lines hidden --- | 72 if not len(self.value): 73 return 74 75 mytotal = reduce(lambda x,y: float(x) + float(y), self.value) 76 mycdf = 0.0 77 78 value = self.value 79 --- 45 unchanged lines hidden --- |