I would like to format a decimal number, inluding numer of decimals and thousand separator respecting the user's locale. E.g
d = Decimal('1234567.1234')
print(locale.format(..., d, ...))
Should output:
1.234.567,123 # 3 decimals, '.' as thousand seprator
1,234,567.12 # 2 decimals, ',' as thousand seprator
And please do not just provide me with links to the docs. I have read those and still cannot figure it out. Thanks