language/units: fix printing

This commit is contained in:
Sebastien Bourdeauducq 2014-10-05 21:35:24 +08:00
parent 2a19d7d32b
commit 6c44fe0a87

View File

@ -41,9 +41,9 @@ class Quantity:
prefix_str = _prefixes_str[r_prefix] prefix_str = _prefixes_str[r_prefix]
if prefix_str == "_": if prefix_str == "_":
prefix_str = "" prefix_str = ""
return str(r_amount) + " " + prefix_str + self.unit.name return str(r_amount) + " " + prefix_str + self.unit
else: else:
return str(r_amount) + " " + self.unit.name return str(r_amount) + " " + self.unit
# mul/div # mul/div
def __mul__(self, other): def __mul__(self, other):