def __init__(self, option_type, short_name, long_name=None, **kwargs):
        """
        Constructor for the CommandOption
        :param option_type: int: one the type constants from above
        :param short_name: string: short name to create optparse's Option
        :param long_name: string: long name to create optparse's Option
        :param kwargs: keyword args
        :return:
        """
        if option_type not in self.OPTION_VALUES:
            raise ValueError("Incorrect option_type.", option_type)

        if long_name and short_name:
            arguments = [short_name, long_name]
            self.display = '{0}/{1}'.format(short_name, long_name)
        elif long_name:
            arguments = [long_name]
            self.display = long_name
        else:
            arguments = [short_name]
            self.display = short_name

        if kwargs in 'api_match' and kwargs['api_match'] is not None:
            self.api_match = kwargs['api_match']
            del kwargs['api_match']
        else:
            self.api_match = True

        if 'cli_match' in kwargs and kwargs['cli_match'] is not None:
            self.cli_match = kwargs['cli_match']
            del kwargs['cli_match']
        else:
            self.cli_match = True

        if 'dest' in kwargs:
            self.dest = kwargs['dest']
        elif long_name:
            self.dest = long_name.strip('-')
        else:
            self.dest = short_name.strip('-')

        self.default = kwargs['default'] if 'default' in kwargs else None

        if 'nargs' in kwargs:
            self.is_optional = (kwargs['nargs'] in ['?', '*'])
            self.is_multiple = (kwargs['nargs'] in ['+', '*'])

            # TODO: Optparse wants a number here... back to argparse?
            if kwargs['nargs'] in ['?', '*', '+']:
                if kwargs['nargs'] in ['*', '+']:
                    kwargs['action'] = 'append'
                del kwargs['nargs']

        else:
            self.is_optional = False
            self.is_multiple = False

        if 'choices' in kwargs:
            self.choices = kwargs['choices']
            if option_type != CommandOption.TYPE_CHOICE:
                kwargs.pop('choices')

        self.option_type = option_type
        self.short_name = short_name
        self.long_name = long_name
        self.args = arguments
        self.kwargs = kwargs
dataset/ETHPy150Open j-bennet/wharfee/wharfee/option.py/CommandOption.__init__/swapped operands of `in`