def __iter__(self):
        if (self._begin, self._end, self.period) in self._cache['__iter__']:
            return iter(self._cache['__iter__'][(self._begin, self._end, self.period)])
        
        if not self.begin or not self.end or not self.period:
            return iter([])
        _iter = []
        for _begin, _end in self._steps():
            _label = self.label(_begin, _end)
            _iter.append((_begin, _end, _label))
        self._cache['__iter__'][(self._begin, self._end, self.period)] = _iter
        """
        progress = self.begin
        while progress < self.end:
            _next = self._getNextStep(progress)
            _label = self.label(progress, _next)
            _iter.append((progress, _next, _label))
            progress = _next
        self._cache[(self._begin, self._end, self.period)] = _iter
        """
        return iter(_iter)
def __iter__ ( self ) : if ( self . _begin , self . _end , self . period ) in self . _cache [ '__iter__' ] : return iter ( self . _cache [ '__iter__' ] [ ( self . _begin , self . _end , self . period ) ] ) if not self . begin or not self . end or not self . period : return iter ( [ ] ) _iter = [ ] for _begin , _end in self . _steps ( ) : _label = self . label ( _begin , _end ) _iter . append ( ( _begin , _end , _label ) ) self . _cache [ '__iter__' ] [ ( self . _begin , self . _end , self . period ) ] = _iter return iter ( _iter )
progress = self.begin
        while progress < self.end:
            _next = self._getNextStep(progress)
            _label = self.label(progress, _next)
            _iter.append((progress, _next, _label))
            progress = _next
        self._cache[(self._begin, self._end, self.period)] = _iter