def CheckCondition(condition, check_object):
 try:
  of = objectfilter.Parser(condition).Parse()
  compiled_filter = of.Compile(objectfilter.BaseFilterImplementation)
  return compiled_filter.Matches(check_object)
 except objectfilter.Error as e:
  raise ConditionError(e)

def CheckCondition ( condition , check_object ) : try : of = objectfilter . Parser ( condition ) . Parse ( ) compiled_filter = of . Compile ( objectfilter . BaseFilterImplementation ) return compiled_filter . Matches ( check_object ) except objectfilter . Error as e : raise ConditionError ( e )
check if a condition matches an object .