(text)
Parse a boolean value.

  Args:
    text: Text to parse.

  Returns:
    Boolean values parsed

  Raises:
    ValueError: If text is not a valid boolean.
Parse a boolean value.
Parse a boolean value .
def ParseBool(text):
  """Parse a boolean value.

  Args:
    text: Text to parse.

  Returns:
    Boolean values parsed

  Raises:
    ValueError: If text is not a valid boolean.
  """
  if text in ('true', 't', '1', 'True'):
    return True
  elif text in ('false', 'f', '0', 'False'):
    return False
  else:
    raise ValueError('Expected "true" or "false".')
def ParseBool ( text ) : if text in ( 'true' , 't' , '1' , 'True' ) : return True elif text in ( 'false' , 'f' , '0' , 'False' ) : return False else : raise ValueError ( 'Expected "true" or "false".' )