(self, index)
return offset
Get index for ring position.
Get index for ring position.
Get index for ring position .
def _ring_index(self, index):
        """Get index for ring position."""
        diff = len(self._buffer) % self._ring_length - index
        offset = len(self._buffer) - diff
        if diff <= 0:
            offset -= self._ring_length
        return offset
def _ring_index ( self , index ) : diff = len ( self . _buffer ) % self . _ring_length - index offset = len ( self . _buffer ) - diff if diff <= 0 : offset -= self . _ring_length return offset