def _CheckExpression(expression):
 expression = _ValidateString(expression, max_len=MAXIMUM_EXPRESSION_LENGTH)
 try:
  expression_parser.Parse(expression)
 except expression_parser.ExpressionException as e:
  raise ExpressionError(('Failed to parse expression "%s"' % expression))
 return expression

def _CheckExpression ( expression ) : expression = _ValidateString ( expression , max_len = MAXIMUM_EXPRESSION_LENGTH ) try : expression_parser . Parse ( expression ) except expression_parser . ExpressionException as e : raise ExpressionError ( ( 'Failed to parse expression "%s"' % expression ) ) return expression
checks whether the expression is a string .