예제 #1
0
 def get_val_wrapper(self, value, index=None):
     """Return a UnitsAttrWrapper object.  Its value attribute
     will be filled in by the caller.
     """
     # pylint: disable=E1101
     if index is not None:
         value = get_indexed_value(value, None, index)
     if self.units:
         return UnitsAttrWrapper(value, units=self.units)
     else:
         return value
예제 #2
0
 def get_val_wrapper(self, value, index=None):
     """Return a UnitsAttrWrapper object.  Its value attribute
     will be filled in by the caller.
     """
     # pylint: disable-msg=E1101
     if index is not None:
         value = get_indexed_value(value, None, index)
     if self.units:
         return UnitsAttrWrapper(value, units=self.units)
     else:
         return value