]> www.ginac.de Git - ginac.git/blobdiff - ginac/add.cpp
fixed a bug where quo() would call vector::reserve() with a negative argument
[ginac.git] / ginac / add.cpp
index b9eca995affd6d9cc295118062f67d79d74f89e2..3a7a9126db69f03209f2bb90bafcd8f1574acf3e 100644 (file)
@@ -152,10 +152,20 @@ void add::print(const print_context & c, unsigned level) const
                                c.s << '+';
                        overall_coeff.print(c, precedence());
                }
-       
+               
                if (precedence() <= level)
                        c.s << ")";
 
+       } else if (is_a<print_python_repr>(c)) {
+
+               c.s << class_name() << '(';
+               op(0).print(c);
+               for (unsigned i=1; i<nops(); ++i) {
+                       c.s << ',';
+                       op(i).print(c);
+               }
+               c.s << ')';
+
        } else {
 
                if (precedence() <= level) {