[Zope3-checkins] CVS: Zope3/src/zope/i18n/locales - __init__.py:1.3

Garrett Smith garrett at mojave-corp.com
Fri Mar 26 21:32:19 EST 2004


Update of /cvs-repository/Zope3/src/zope/i18n/locales
In directory cvs.zope.org:/tmp/cvs-serv12605/src/zope/i18n/locales

Modified Files:
	__init__.py 
Log Message:
Added support for rounding formatted numbers. E.g. 1.49 formatted with
the pattern "0.0" should be "1.5" -- not "1.4". 


=== Zope3/src/zope/i18n/locales/__init__.py 1.2 => 1.3 ===
--- Zope3/src/zope/i18n/locales/__init__.py:1.2	Tue Mar  2 09:26:45 2004
+++ Zope3/src/zope/i18n/locales/__init__.py	Fri Mar 26 21:31:48 2004
@@ -560,7 +560,7 @@
       >>> formatter.format(3.4)
       u'3,4'
       >>> formatter.format(-3.4567)
-      u'-3,456'
+      u'-3,457'
       >>> formatter.format(3210.4)
       u'3.210,4'
 
@@ -579,10 +579,10 @@
       >>> numbers.defaultScientificFormat = 'long'
       >>> formatter = numbers.getFormatter('scientific')
       >>> formatter.format(1234.5678)
-      u'1,234567E+03'
+      u'1,234568E+03'
       >>> formatter = numbers.getFormatter('scientific', 'medium')
       >>> formatter.format(1234.5678)
-      u'1,2345E+03'
+      u'1,2346E+03'
 
       Setting up and accessing percent formats with named format lengths
       and format names
@@ -597,7 +597,7 @@
       >>> numbers.defaultPercentFormat = 'long'
       >>> formatter = numbers.getFormatter('percent')
       >>> formatter.format(123.45678)
-      u'123,456%'
+      u'123,457%'
       >>> formatter = numbers.getFormatter('percent', name='bar')
       >>> formatter.format(123.45678)
       u'123%'




More information about the Zope3-Checkins mailing list