[Python-checkins] cpython: Issue #18228: Use locale.setlocale(name, None) instead of
victor.stinner
python-checkins at python.org
Mon Jun 17 21:28:40 CEST 2013
http://hg.python.org/cpython/rev/6cbd992d3411
changeset: 84192:6cbd992d3411
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Jun 17 21:28:14 2013 +0200
summary:
Issue #18228: Use locale.setlocale(name, None) instead of
locale.getlocale(name) in test.regrtest.saved_test_environment
locale.getlocale() parses the locale, which is useless for
saved_test_environment.
files:
Lib/test/regrtest.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -1232,12 +1232,12 @@
shutil.rmtree(support.TESTFN)
_lc = [getattr(locale, lc) for lc in dir(locale)
- if lc.startswith('LC_') and lc != 'LC_ALL']
+ if lc.startswith('LC_')]
def get_locale(self):
pairings = []
for lc in self._lc:
try:
- pairings.append((lc, locale.getlocale(lc)))
+ pairings.append((lc, locale.setlocale(lc, None)))
except (TypeError, ValueError):
continue
return pairings
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list