D
Daniele Varrazzo
Hi everybody
Is there any way to make the most of locale.localeconv() in formatting currencies?
I can use many tricks as lc['currency_symbol'],
locale.format('%.*f', (lc['frac_digits'],cash), 1))
€1.427,48
But that presumes many things, such as
lc['mon_grouping'] == lc['grouping'] # format uses the latter value, doesn't he?
lc['p_sign_posn'] == 3 # else i must change the format string,
# maybe building a mapping to order the pieces, splitting + and - cases...
I'm using...
Python 2.3.2 (#49, Oct 24 2003, 13:37:57) [MSC v.1200 32 bit (Intel)] on win32
.... and watching localeconv(), i also see many other not much documented details:
n_cs_precedes, n_sep_by_space...
Is it up to me to write a function to keep all these details into account?
Bye
Daniele
Is there any way to make the most of locale.localeconv() in formatting currencies?
I can use many tricks as lc['currency_symbol'],
locale.format('%.*f', (lc['frac_digits'],cash), 1))
€1.427,48
But that presumes many things, such as
lc['mon_grouping'] == lc['grouping'] # format uses the latter value, doesn't he?
lc['p_sign_posn'] == 3 # else i must change the format string,
# maybe building a mapping to order the pieces, splitting + and - cases...
I'm using...
Python 2.3.2 (#49, Oct 24 2003, 13:37:57) [MSC v.1200 32 bit (Intel)] on win32
.... and watching localeconv(), i also see many other not much documented details:
n_cs_precedes, n_sep_by_space...
Is it up to me to write a function to keep all these details into account?
Bye
Daniele