projects
/
linpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
String formatting for empty expressions
[linpy.git]
/
pypol
/
linear.py
diff --git
a/pypol/linear.py
b/pypol/linear.py
index
5b5d8aa
..
6550e92
100644
(file)
--- a/
pypol/linear.py
+++ b/
pypol/linear.py
@@
-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):