'Sets the operator for this expression.'

def SetOperator(self, operator):

    self.operator = operator
    attribute_type = self.attribute_obj.GetRDFValueType()
    operators = attribute_type.operators
    (self.number_of_args, self.operator_method) = operators.get(operator, (0, None))
    if (self.operator_method is None):
        raise lexer.ParseError(("Operator    %s    not    defined    on    attribute    '%s'" % (operator, self.attribute)))
    self.operator_method = getattr(attribute_type, self.operator_method)
