* Remove check for empty seq in Python output.
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Wed, 19 Dec 2001 22:06:24 +0000 (22:06 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Wed, 19 Dec 2001 22:06:24 +0000 (22:06 +0000)
ginac/add.cpp
ginac/mul.cpp

index 279933d..3a7a912 100644 (file)
@@ -159,10 +159,8 @@ void add::print(const print_context & c, unsigned level) const
        } 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) {
+               op(0).print(c);
+               for (unsigned i=1; i<nops(); ++i) {
                        c.s << ',';
                        op(i).print(c);
                }
index 47f74f6..5166880 100644 (file)
@@ -171,10 +171,8 @@ void mul::print(const print_context & c, unsigned level) const
 
        } 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) {
+               op(0).print(c);
+               for (unsigned i=1; i<nops(); ++i) {
                        c.s << ',';
                        op(i).print(c);
                }