def _set_operation(self, v): v = convert.to_operation(v) self.last_operation = v if self.last_value: if not self.expression: self._create_expression("indicated by value and operation.") if self.build_expression is None: self.build_expression = True self._assume("the beginning of a simple expression.") if self.last_value: self._add("last_value") self._add("last_operation")
def is_operation(s): convert.to_operation(s)