String formatting for empty expressions
[linpy.git] / pypol / linear.py
index 5b5d8aa..6550e92 100644 (file)
@@ -206,6 +206,8 @@ class Expression:
         elif constant < 0:
             constant *= -1
             string += ' - {}'.format(constant)
+        if string == '':
+            string = '0'
         return string
 
     def _parenstr(self, always=False):