def _string_to_bool(s):
 if (not is_string_like(s)):
  return bool(s)
 if (s.lower() in [u'on', u'true']):
  return True
 if (s.lower() in [u'off', u'false']):
  return False
 raise ValueError((u'String "%s" must be one of: "on", "off", "true", or "false"' % s))

def _string_to_bool ( s ) : if ( not is_string_like ( s ) ) : return bool ( s ) if ( s . lower ( ) in [ u'on' , u'true' ] ) : return True if ( s . lower ( ) in [ u'off' , u'false' ] ) : return False raise ValueError ( ( u'String "%s" must be one of: "on", "off", "true", or "false"' % s ) )
parses the string argument as a boolean .