def _new_constant_expr(self, cst, safe_number=True): if safe_number: k = cst else: self_number_validation_fn = self.number_validation_fn k = self_number_validation_fn(cst) if self_number_validation_fn else cst return ConstantExpr(self._model, k)
def _new_constant_expr(self, cst, safe_number=True): k = cst if not safe_number: self_number_validation_fn = self.number_validation_fn if self_number_validation_fn: k = self_number_validation_fn(cst) return ConstantExpr(self._model, k)
def _new_safe_constant_expr(self, cst): return ConstantExpr(self._model, cst)