def is_operator(element):
 return (isinstance(element, basestring) and (element in DOMAIN_OPERATORS))

def is_operator ( element ) : return ( isinstance ( element , basestring ) and ( element in DOMAIN_OPERATORS ) )
test whether an object is a valid domain operator .