def __setstate__(self, state):
        """Called by pickle, PyYAML etc to set state."""
        self.start = state['start']
        self.end = state['end']
        self.interval = state.get('interval') or CLOSED_CLOSED
        self.step = 1
def __setstate__ ( self , state ) : self . start = state [ 'start' ] self . end = state [ 'end' ] self . interval = state . get ( 'interval' ) or CLOSED_CLOSED self . step = 1
Called by pickle, PyYAML etc to set state.