Mercurial > cpython-lru_cache-weakref
diff Lib/argparse.py @ 69005:75ec20b4c50e 2.7
Issue #9026: Fix order of argparse sub-commands in help messages. (Merged from 3.2.)
| author | Steven Bethard <steven.bethard@gmail.com> |
|---|---|
| date | Sun, 27 Mar 2011 13:57:55 +0200 |
| parents | 4bb651eb7539 |
| children | f961e9179998 |
line wrap: on
line diff
--- a/Lib/argparse.py Sun Mar 27 10:10:46 2011 +0200 +++ b/Lib/argparse.py Sun Mar 27 13:57:55 2011 +0200 @@ -82,6 +82,7 @@ ] +import collections as _collections import copy as _copy import os as _os import re as _re @@ -1037,7 +1038,7 @@ self._prog_prefix = prog self._parser_class = parser_class - self._name_parser_map = {} + self._name_parser_map = _collections.OrderedDict() self._choices_actions = [] super(_SubParsersAction, self).__init__(
