brmbar.Currency.str(): Properly format to two decimal places

This commit is contained in:
Petr Baudis 2012-09-24 01:57:33 +02:00
parent 7574b916cd
commit 30cd5462b4

View file

@ -75,4 +75,4 @@ class Currency:
return resamount
def str(self, amount):
return str(amount) + " " + self.name
return "{:.2f} {}".format(amount, self.name)