From: Jeroen Ruigrok van der Werven Date: Sat, 22 Aug 2009 12:09:29 +0000 (+0000) Subject: Revert part of the commits with relation to the de locale's use of \xa0 as X-Git-Tag: 1.0~253 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5ab539c4e8a1cfc44153fbeeb794353e2593f76;p=thirdparty%2Fbabel.git Revert part of the commits with relation to the de locale's use of \xa0 as thousands separator, this is still a proposed change and not the active one. --- diff --git a/babel/numbers.py b/babel/numbers.py index 1c7dcee2..2a9939cf 100644 --- a/babel/numbers.py +++ b/babel/numbers.py @@ -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: