def next(self):
        """
        Returns the next (object, nextPageToken) pair.
        """
        if self._currentObject is None:
            raise StopIteration()
        nextPageToken = None
        if self._nextObject is not None:
            start = self._getStart(self._nextObject)
            # If start > the search anchor, move the search anchor. Otherwise,
            # increment the distance from the anchor.
            if start > self._searchAnchor:
                self._searchAnchor = start
                self._distanceFromAnchor = 0
            else:
                self._distanceFromAnchor += 1
            nextPageToken = "{}:{}".format(
                self._searchAnchor, self._distanceFromAnchor)
        ret = self._extractProtocolObject(self._currentObject), nextPageToken
        self._currentObject = self._nextObject
        self._nextObject = next(self._searchIterator, None)
        return ret
def next ( self ) : if self . _currentObject is None : raise StopIteration ( ) nextPageToken = None if self . _nextObject is not None : start = self . _getStart ( self . _nextObject ) if start > self . _searchAnchor : self . _searchAnchor = start self . _distanceFromAnchor = 0 else : self . _distanceFromAnchor += 1 nextPageToken = "{}:{}" . format ( self . _searchAnchor , self . _distanceFromAnchor ) ret = self . _extractProtocolObject ( self . _currentObject ) , nextPageToken self . _currentObject = self . _nextObject self . _nextObject = next ( self . _searchIterator , None ) return ret
Returns the next (object, nextPageToken) pair.