(self, unit)
Make changes to the unit.
Make changes to the unit.
Make changes to the unit .
def unit(self, unit):
        """Make changes to the unit."""
        if unit not in ('s', 'm', 'd', 'h'):
            raise ValueError(
                'Unable to add interval, needs to be one of: '
                's (seconds), m (minutes), h (hours) or d (days)')
        self._unit = unit
def unit ( self , unit ) : if unit not in ( 's' , 'm' , 'd' , 'h' ) : raise ValueError ( 'Unable to add interval, needs to be one of: ' 's (seconds), m (minutes), h (hours) or d (days)' ) self . _unit = unit