diff babel/core.py @ 127:a72de8971819

Add currency formatting.
author cmlenz
date Mon, 18 Jun 2007 16:19:50 +0000
parents d9c34d2f3d1d
children 1662e1a4fc7b
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):
Copyright (C) 2012-2017 Edgewall Software