def ask_bool(self, question, min_length=None, default=None):
        if min_length:
            question = question.ljust(min_length, ' ')

        answer = None
        prompt = question + ' [yn]: ' 
        if default is not None:
            if default is True or default in 'yY':
                prompt = question + ' [Yn]: '
                default = True
            
            elif default is False or default in 'nN':
                prompt = question + ' [yN]: '
                default = False

            else:
                default = None

        while answer is None:
            answer = raw_input(prompt)
            if answer:
                if 'yY' in answer:
                    answer = True
                elif answer in 'nN':
                    answer = False
                else:
                    self.error('Invalid response')
                    answer = None
            else:
                answer = default

        return answer
dataset/ETHPy150Open tehmaze/nagios-cli/nagios_cli/cli.py/CLI.ask_bool/swapped operands of `in`