[Zope3-checkins] SVN: Zope3/trunk/src/zope/i18n/format.py Fixed a bug that caused custom settings to persist across number format instances.

Garrett Smith garrett at mojave-corp.com
Fri May 14 14:59:58 EDT 2004


Log message for revision 24677:
Fixed a bug that caused custom settings to persist across number format instances.


-=-
Modified: Zope3/trunk/src/zope/i18n/format.py
===================================================================
--- Zope3/trunk/src/zope/i18n/format.py	2004-05-14 18:59:56 UTC (rev 24676)
+++ Zope3/trunk/src/zope/i18n/format.py	2004-05-14 18:59:57 UTC (rev 24677)
@@ -146,21 +146,21 @@
 
     implements(INumberFormat)
 
-    # See zope.i18n.interfaces.INumberFormat
-    symbols = {u'decimal': u'.',
-               u'group': u',',
-               u'list':  u';',
-               u'percentSign': u'%',
-               u'nativeZeroDigit': u'0',
-               u'patternDigit': u'#',
-               u'plusSign': u'+',
-               u'minusSign': u'-',
-               u'exponential': u'E',
-               u'perMille': u'\xe2\x88\x9e',
-               u'infinity': u'\xef\xbf\xbd',
-               u'nan': ''}
-
     def __init__(self, pattern=None, symbols={}):
+        # setup default symbols
+        self.symbols = {
+            u'decimal': u'.',
+            u'group': u',',
+            u'list':  u';',
+            u'percentSign': u'%',
+            u'nativeZeroDigit': u'0',
+            u'patternDigit': u'#',
+            u'plusSign': u'+',
+            u'minusSign': u'-',
+            u'exponential': u'E',
+            u'perMille': u'\xe2\x88\x9e',
+            u'infinity': u'\xef\xbf\xbd',
+            u'nan': '' }
         self.symbols.update(symbols)
         self._pattern = pattern
         self._bin_pattern = None




More information about the Zope3-Checkins mailing list