From: Guido van Rossum Date: Mon, 16 Apr 2001 16:04:10 +0000 (+0000) Subject: Implement Mark Favas's suggestion. There's a clear bug in _group(): X-Git-Tag: v2.1~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=67addfe2a87d22458323e268d2bcc7406e6febc2;p=thirdparty%2FPython%2Fcpython.git Implement Mark Favas's suggestion. There's a clear bug in _group(): its first return statement returns a single value while its caller always expects it to return a tuple of two items. Fix this by returning (s, 0) instead. This won't make the locale test on Irix succeed, but now it will fail because of a bug in the platform's en_US locale rather than because of a bug in the locale module. --- diff --git a/Lib/locale.py b/Lib/locale.py index f88803c5f3fd..dd7df1e743bc 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -93,7 +93,7 @@ except ImportError: def _group(s): conv=localeconv() grouping=conv['grouping'] - if not grouping:return s + if not grouping:return (s, 0) result="" seps = 0 spaces = ""