(self, s, default=False)
return default
Convert a string to a booleen value.
Convert a string to a booleen value.
Convert a string to a booleen value .
def _str2bool(self, s, default=False):
        """ Convert a string to a booleen value. """
        s = str(s)
        if s.lower() in ['0', 'f', 'false', 'off', 'no', 'n']:
            return False
        elif s.lower() in ['1', 't', 'true', 'on', 'yes', 'y']:
            return True
        return default
def _str2bool ( self , s , default = False ) : s = str ( s ) if s . lower ( ) in [ '0' , 'f' , 'false' , 'off' , 'no' , 'n' ] : return False elif s . lower ( ) in [ '1' , 't' , 'true' , 'on' , 'yes' , 'y' ] : return True return default