(self, property, value=None, cap=False)
return current
keep previous value
keep previous value
keep previous value
def update_history(self, property, value=None, cap=False):
        '''
        keep previous value
        '''
        if value is not None:
            current = value
        else:
            current = self.get_property(property, cap)
        if isinstance(current, dict):
            current = current.copy()
        previous = self.history.get(property, {}).get('current')
        if previous is None:
            previous = current
        self.history[property] = {'current' : current,
                                  'previous': previous}
        return current
def update_history ( self , property , value = None , cap = False ) : if value is not None : current = value else : current = self . get_property ( property , cap ) if isinstance ( current , dict ) : current = current . copy ( ) previous = self . history . get ( property , { } ) . get ( 'current' ) if previous is None : previous = current self . history [ property ] = { 'current' : current , 'previous' : previous } return current