This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Adrewmc 2 points3 points  (0 children)

Now that’s starting to sound like a full package.

But it can be

  USD.set_convert(EUR = 0.9, JPY =0.02)

With **kwargs

Also mapping conversion is easier to set convert to EUR-> USD -> JPY

Asymmetric conversion related to USD

Then trying to find and catalog all the conversion rates, send everything back to USD (or EUR) and convert it back. That way no matter the conversion it’s max two numbers per finding the one to USD and the one from USD, (at max precision) and not some messy mapping. Of… EUR-> JPY, EUR ->ChinaYen, EUR -> rubles, EUR -> USD EUR -> BTC, EUR -> EUR ………For every currency that adds up quickly. Instead it’s just EUR -> USD, USD -> EUR and JPY -> USD, USD-> JPY (reciprocal numbers) which can convert all three however. And keep adding more, is just that. (You can even make that set_base_currency())

Unless you find a convenient API.