diff --git a/Lib/argparse.py b/Lib/argparse.py index 98374323c9c..78f4dcb2287 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -1080,7 +1080,7 @@ def __call__(self, parser, namespace, values, option_string=None): 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 @@ def __call__(self, string): 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 diff --git a/Misc/NEWS b/Misc/NEWS index 89894d85adf..82a4cd5ae05 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -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.