info.py (1049:b175a798c8d4) | info.py (1165:234f3cdd541a) |
---|---|
1from __future__ import division 2import operator, re, types 3 4source = None 5display_run = 0 6 7def issequence(t): 8 return isinstance(t, types.TupleType) or isinstance(t, types.ListType) --- 138 unchanged lines hidden (view full) --- 147 self.__dict__['value'] = self.getValue() 148 return self.__dict__['value'] 149 else: 150 return super(Statistic, self).__getattribute__(attr) 151 152 def __setattr__(self, attr, value): 153 if attr == 'bins' or attr == 'ticks': 154 if attr == 'bins': | 1from __future__ import division 2import operator, re, types 3 4source = None 5display_run = 0 6 7def issequence(t): 8 return isinstance(t, types.TupleType) or isinstance(t, types.ListType) --- 138 unchanged lines hidden (view full) --- 147 self.__dict__['value'] = self.getValue() 148 return self.__dict__['value'] 149 else: 150 return super(Statistic, self).__getattribute__(attr) 151 152 def __setattr__(self, attr, value): 153 if attr == 'bins' or attr == 'ticks': 154 if attr == 'bins': |
155 global db | |
156 if value is not None: | 155 if value is not None: |
157 value = db.getBin(value) | 156 value = source.getBin(value) |
158 elif attr == 'samples' and type(value) is str: 159 value = [ int(x) for x in value.split() ] 160 161 self.__dict__[attr] = value 162 self.__dict__['value'] = None 163 else: 164 super(Statistic, self).__setattr__(attr, value) 165 --- 559 unchanged lines hidden --- | 157 elif attr == 'samples' and type(value) is str: 158 value = [ int(x) for x in value.split() ] 159 160 self.__dict__[attr] = value 161 self.__dict__['value'] = None 162 else: 163 super(Statistic, self).__setattr__(attr, value) 164 --- 559 unchanged lines hidden --- |