def visit_and_update(self, visitor_fn):
        """Create an updated version (if needed) of BetweenClause via the visitor pattern."""
        new_lower_bound = self.lower_bound.visit_and_update(visitor_fn)
        new_upper_bound = self.upper_bound.visit_and_update(visitor_fn)

        if new_lower_bound is not self.lower_bound or new_upper_bound is not self.upper_bound:
            return visitor_fn(BetweenClause(self.field, new_lower_bound, new_upper_bound))
        else:
            return visitor_fn(self)
def visit_and_update ( self , visitor_fn ) : new_lower_bound = self . lower_bound . visit_and_update ( visitor_fn ) new_upper_bound = self . upper_bound . visit_and_update ( visitor_fn ) if new_lower_bound is not self . lower_bound or new_upper_bound is not self . upper_bound : return visitor_fn ( BetweenClause ( self . field , new_lower_bound , new_upper_bound ) ) else : return visitor_fn ( self )
Create an updated version (if needed) of BetweenClause via the visitor pattern.