I've been working on these presentation types, to complete the set.
'%' is straightforward, just multiply the mpf by 100 and add a % sign at the end.
'n' is a lot trickier, since some locales may be difficult to program.
For instance,
>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'en_IN.utf8')
>>> print('{:.10n}'.format(100000.25))
1,00,000.25
Would a partial implementation of 'n' (i.e., only care about thousands and decimal separators) be useful or should we not bother at all with it?
I've been working on these presentation types, to complete the set.
'%' is straightforward, just multiply the
mpfby 100 and add a % sign at the end.'n' is a lot trickier, since some locales may be difficult to program.
For instance,
Would a partial implementation of 'n' (i.e., only care about thousands and decimal separators) be useful or should we not bother at all with it?