def add_option(self, option):
        """
        Add a new option to this key.

        Parameters
        ----------
        option : Sized or str or int or float
            A new option to add. This must have the same format with exsiting
            options.

        Raises
        ------
        TypeError
            If the format of the given ``option`` is different.

        """
        if len(self.options) == 0:
            self.options.append(option)
        else:
            sized_op = isinstance(option, (list, tuple))
            if self._sized_op != sized_op:
                raise TypeError("Option type is mismatched!")
            self.options.append(option)
def add_option ( self , option ) : if len ( self . options ) == 0 : self . options . append ( option ) else : sized_op = isinstance ( option , ( list , tuple ) ) if self . _sized_op != sized_op : raise TypeError ( "Option type is mismatched!" ) self . options . append ( option )
Add a new option to this key.

        Parameters
        ----------
        option : Sized or str or int or float
            A new option to add. This must have the same format with exsiting
            options.

        Raises
        ------
        TypeError
            If the format of the given ``option`` is different.