]> granicus.if.org Git - python/commitdiff
Implement Mark Favas's suggestion. There's a clear bug in _group():
authorGuido van Rossum <guido@python.org>
Mon, 16 Apr 2001 16:04:10 +0000 (16:04 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 16 Apr 2001 16:04:10 +0000 (16:04 +0000)
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.

Lib/locale.py

index f88803c5f3fd1d9871093050e630954f778e4b0b..dd7df1e743bc30fe0f5189591db0adb81f143184 100644 (file)
@@ -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 = ""