def __init__(self, slice_info):
super().__init__()<EOL>if isinstance(slice_info, slice):<EOL><INDENT>self.slice, self.index = slice_info, None<EOL><DEDENT>else:<EOL><INDENT>self.slice, self.index = None, slice_info<EOL><DEDENT>
Save attributes.

        Arguments
        ---------
        slice_info : slice or number
            If a ``slice``, value will be saved in ``self.slice``, otherwise in ``self.index``.