retab? maybe

This commit is contained in:
Nils Schweinsberg 2017-10-15 03:42:18 +02:00
parent 023ac72be6
commit a0575a4826

View File

@ -13,12 +13,12 @@ class Coins(Plugin):
@staticmethod
def __currency(name, prefix=None, suffix=None):
def tostr(value):
return '{prefix}{value:,.2f}{suffix}'.format(
prefix=prefix or '',
suffix=suffix or ('' if (prefix or suffix) else (' ' + name)),
value=value)
return tostr
def tostr(value):
return '{prefix}{value:,.2f}{suffix}'.format(
prefix=prefix or '',
suffix=suffix or ('' if (prefix or suffix) else (' ' + name)),
value=value)
return tostr
CURRENCIES = {
'usd': __currency('usd', prefix='$'),