Mercurial > babel > old > babel-test
diff babel/core.py @ 125:b75ae5def3b1
Add currency formatting.
author | cmlenz |
---|---|
date | Mon, 18 Jun 2007 16:19:50 +0000 |
parents | 4dcdb1d367ec |
children | 37f4875bad88 |
line wrap: on
line diff
--- a/babel/core.py +++ b/babel/core.py @@ -314,6 +314,17 @@ :type: `dict` """) + def currency_formats(self): + return self._data['currency_formats'] + currency_formats = property(currency_formats, doc=r"""\ + Locale patterns for currency number formatting. + + >>> print Locale('en', 'US').currency_formats[None] + <NumberPattern u'\xa4#,##0.00'> + + :type: `dict` + """) + def percent_formats(self): return self._data['percent_formats'] percent_formats = property(percent_formats, doc="""\ @@ -325,6 +336,17 @@ :type: `dict` """) + def scientific_formats(self): + return self._data['scientific_formats'] + scientific_formats = property(scientific_formats, doc="""\ + Locale patterns for scientific number formatting. + + >>> Locale('en', 'US').scientific_formats[None] + <NumberPattern u'#E0'> + + :type: `dict` + """) + #{ Calendar Information and Date Formatting def periods(self):