diff options
author | Éric Araujo <merwok@netwok.org> | 2010-12-03 19:24:49 +0000 |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2010-12-03 19:24:49 +0000 |
commit | fb3de6b437ba92701e162eb830bbc775cda135b5 (patch) | |
tree | dc21d150bf5aa77adccb14e3a23fdddb5740b2da | |
parent | 5cf79f66378cc90eac12dfdbbdef05f1b3cd7771 (diff) | |
download | cpython-git-fb3de6b437ba92701e162eb830bbc775cda135b5.tar.gz |
Merged revisions 86985 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86985 | eric.araujo | 2010-12-03 20:19:17 +0100 (ven., 03 déc. 2010) | 5 lines
Fix incorrect use of gettext in argparse (#10497).
Steven, the maintainer of argparse, agreed to have this committed
without tests for now, since the fix is obvious. See the bug log.
........
-rw-r--r-- | Lib/argparse.py | 4 | ||||
-rw-r--r-- | Misc/NEWS | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py index 98374323c9..78f4dcb228 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -1080,7 +1080,7 @@ class _SubParsersAction(Action): parser = self._name_parser_map[parser_name] except KeyError: tup = parser_name, ', '.join(self._name_parser_map) - msg = _('unknown parser %r (choices: %s)' % tup) + msg = _('unknown parser %r (choices: %s)') % tup raise ArgumentError(self, msg) # parse all the remaining options into the namespace @@ -1121,7 +1121,7 @@ class FileType(object): elif 'w' in self._mode: return _sys.stdout else: - msg = _('argument "-" with mode %r' % self._mode) + msg = _('argument "-" with mode %r') % self._mode raise ValueError(msg) # all other arguments are used as file names @@ -1,4 +1,4 @@ -+++++++++++ +:xq Python News +++++++++++ @@ -13,6 +13,8 @@ Core and Builtins Library ------- +- Issue #10497: Fix incorrect use of gettext in argparse. + - Issue #10464: netrc now correctly handles lines with embedded '#' characters. |