Return all buffered data, and clear the stack.

def flush(self):
        """Return all buffered data, and clear the stack."""

        (slice_, self.__buffer) = (self.__buffer, '')
        self.__size = 0

        return slice_