def forward(self, i=1):
        '''Jump to a location in history ``i`` steps forward.
        
        :param i: The number of steps to jump forward.
        :type i: positive int
        :returns: The current :attr:`location`.
        '''
        if i > 0:
            push_back = self._back.append
            pop_forward = self._forward.popleft
            for _ in xrange(min(i, len(self._forward))):
                push_back(pop_forward())
        return self.location
Jump to a location in history ``i`` steps forward.
        
        :param i: The number of steps to jump forward.
        :type i: positive int
        :returns: The current :attr:`location`.
        
recipes/Python/576991_Browser_history_data_structure/recipe-576991.py