summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-04-16 16:04:10 (GMT)
committerGuido van Rossum <guido@python.org>2001-04-16 16:04:10 (GMT)
commit67addfe2a87d22458323e268d2bcc7406e6febc2 (patch)
tree663f9e2a70fb82a77b852d3320ae2de7c2393997 /Lib
parent1fcd4389562476b9ccf6e7be3f58c68b54dd15be (diff)
downloadcpython-67addfe2a87d22458323e268d2bcc7406e6febc2.zip
cpython-67addfe2a87d22458323e268d2bcc7406e6febc2.tar.gz
cpython-67addfe2a87d22458323e268d2bcc7406e6febc2.tar.bz2
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.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/locale.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/locale.py b/Lib/locale.py
index f88803c..dd7df1e 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 = ""