def validate_bool(args, key, default=None):
 value = validate_exists(args, key, default)
 if (value.lower() == 'true'):
  return True
 elif (value.lower() == 'false'):
  return False
 else:
  raise ArgumentError((_("Argument %(key)s may not take value %(value)s. Valid values are ['true', 'false'].") % {'key': key, 'value': value}))

def validate_bool ( args , key , default = None ) : value = validate_exists ( args , key , default ) if ( value . lower ( ) == 'true' ) : return True elif ( value . lower ( ) == 'false' ) : return False else : raise ArgumentError ( ( _ ( "Argument %(key)s may not take value %(value)s. Valid values are ['true', 'false']." ) % { 'key' : key , 'value' : value } ) )
convert b to a boolean or raise .