def __init__(self, name, mode=None,
                 description='', default=None, validator=None):
        """
        Constructor

        :param name: The argument name
        :type name: str
        :param mode: The argument mode: REQUIRED or OPTIONAL
        :type mode: int or None
        :param description: A description text
        :type description: str
        :param default: The default value (for OPTIONAL mode only)
        :type default: mixed
        :param validator: A Validator instance or a callable
        :type validator: Validator or callable
        """
        if mode is None:
            mode = self.OPTIONAL
        elif not isinstance(mode, int) or mode > 7 or mode < 1:
            raise Exception('Argument mode "%s" is not valid.' % mode)

        self.__name = name
        self.__mode = mode
        self.__description = description or ''
        self.__validator = VALIDATORS.get(validator)

        self.set_default(default)
dataset/ETHPy150Open sdispater/cleo/cleo/inputs/input_argument.py/InputArgument.__init__/original