def visit_cpp_and(self, expr, context, **kwargs): ctx = [] CppVisitor.visit_cpp_and(self, expr, context=ctx, **kwargs) context.append('(' + ' && '.join(ctx) + ')')