]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Revert part of the commits with relation to the de locale's use of \xa0 as
authorJeroen Ruigrok van der Werven <asmodai@in-nomine.org>
Sat, 22 Aug 2009 12:09:29 +0000 (12:09 +0000)
committerJeroen Ruigrok van der Werven <asmodai@in-nomine.org>
Sat, 22 Aug 2009 12:09:29 +0000 (12:09 +0000)
thousands separator, this is still a proposed change and not the active one.

babel/numbers.py

index 1c7dcee210e36afc02160a9967c5a3ce8c4a8eac..2a9939cf9e72852a01f5a2fc7878daab3bc28bac 100644 (file)
@@ -133,7 +133,7 @@ def format_number(number, locale=LC_NUMERIC):
     >>> format_number(1099, locale='en_US')
     u'1,099'
     >>> format_number(1099, locale='de_DE')
-    u'1\\xa0099'
+    u'1.099'
 
     
     :param number: the number to format
@@ -155,8 +155,8 @@ def format_decimal(number, format=None, locale=LC_NUMERIC):
     u'-1.235'
     >>> format_decimal(1.2345, locale='sv_SE')
     u'1,234'
-    >>> format_decimal(12345, locale='de')
-    u'12\\xa0345'
+    >>> format_decimal(1.2345, locale='de')
+    u'1,234'
 
     The appropriate thousands grouping and the decimal separator are used for
     each locale:
@@ -184,7 +184,7 @@ def format_currency(number, currency, format=None, locale=LC_NUMERIC):
     >>> format_currency(1099.98, 'USD', locale='es_CO')
     u'US$\\xa01.099,98'
     >>> format_currency(1099.98, 'EUR', locale='de_DE')
-    u'1\\xa0099,98\\xa0\\u20ac'
+    u'1.099,98\\xa0\\u20ac'
     
     The pattern can also be specified explicitly: