prePEP: Money data type

Batista, Facundo FBatista at uniFON.com.ar
Wed Oct 22 13:00:33 EDT 2003


Alex Martelli wrote:

#- I think, but I don't _know_, that:
#- 
#- m.format()
#- 
#- should DEFAULT to using the current locale.localeconv(); a full
#- call would have:
#- 
#- m.format(localeconv=somelocaleconvlikedict, 
#- formatkind='international')
#- 
#- default localeconv being locale.localeconv(), default 
#- formatkind being
#- "plain" (no currency symbol), alternatives 'local' (e.g. '$') or 
#- 'international' (e.g. 'USD').  I.e., 2 optional args, a 
#- localeconv-like 
#- dict (of which you'll only use and thus only check a few entries),
#- the other a string or maybe Money.FORMAT_INTERNATIONAL &c
#- if you feel grandiose, to pick one of the 3 formatting styles.

Without a doubt (having problems spelling 'undoubtely') .format must be
conscious of locale. Maybe .parse too.

.	Facundo





More information about the Python-list mailing list