2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-29 13:13:34 +08:00

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]
if prefix_str == "_":
prefix_str = ""
return str(r_amount) + " " + prefix_str + self.unit.name
return str(r_amount) + " " + prefix_str + self.unit
else:
return str(r_amount) + " " + self.unit.name
return str(r_amount) + " " + self.unit
# mul/div
def __mul__(self, other):