]> www.ginac.de Git - ginac.git/blobdiff - ginac/mul.cpp
* Added output-support for Python bindings and LaTeX printing for
[ginac.git] / ginac / mul.cpp
index 64b090af6ecdd1f721e69617b022625c1ef5df26..47f74f6f4c1b920050adf85a66154029bb42808c 100644 (file)
@@ -169,6 +169,16 @@ void mul::print(const print_context & c, unsigned level) const
                if (precedence() <= level)
                        c.s << ")";
 
+       } else if (is_a<print_python_repr>(c)) {
+               c.s << class_name() << '(';
+               unsigned end = nops();
+               if (end)
+                       op(0).print(c);
+               for (unsigned i=1; i<end; ++i) {
+                       c.s << ',';
+                       op(i).print(c);
+               }
+               c.s << ')';
        } else {
 
                if (precedence() <= level) {