def yn(self, prompt, default=None):
        """Prompts the user for yes/no confirmation, with optional default"""
        if default is True:
            opts = " [Y/n]: "
        elif default is False:
            opts = " [y/N]: "
        else:
            opts = " [y/n]: "
        prompt += opts
        return self.input(curry(filter_yn, default=default), prompt)
def yn ( self , prompt , default = None ) : if default is True : opts = " [Y/n]: " elif default is False : opts = " [y/N]: " else : opts = " [y/n]: " prompt += opts return self . input ( curry ( filter_yn , default = default ) , prompt )
Prompts the user for yes/no confirmation, with optional default