def ask(self, question, name, accept=None, required=True, default=None, force=False, parse=True):
        """
        Asks the user for value for the given configuration field:

        :param question: Question to ask the user
        :type question: string
        :param name: Name of field to store value in
        :type name: string
        :param accept: Any of the supported types to validate for (see matchesType)
        :type accept: string
        :param required: Whether the field is required
        :type required: boolean
        :param default: Default value whenever user has given no value
        """

        while True:
            msg = "- %s?" % question
            if accept is not None:
                msg += Console.colorize(" [%s]" % accept, "grey")

            if default is None:
                msg += Console.colorize(" (%s)" % name, "magenta")
            else:
                msg += Console.colorize((name, default) % " (%s=%s)", "magenta")

            msg += ": "

            sys.stdout.write(msg)

            # Do not ask user for solved items
            if not force and self.has(name):
                print("%s %s" % (self.get(name), Console.colorize("(pre-filled)", "cyan")))
                return

            # Read user input, but ignore any leading/trailing white space
            value = input().strip()

            # Fallback to default if no value is given and field is not required
            if not required and value == "":
                value = default

            # Don't accept empty values
            if value == "":
                continue

            # Try setting the current value
            if self.set(name, value, accept=accept, parse=parse):
                break
dataset/ETHPy150Open zynga/jasy/jasy/core/Config.py/Config.ask/swapped operands of `%`