Issue #9026: Fix order of argparse sub-commands in help messages. (Merged from 3.2.)

This commit is contained in:
Steven Bethard 2011-03-27 13:57:55 +02:00
parent 49b0ce06f0
commit bc3b104e46
3 changed files with 84 additions and 4 deletions

View file

@ -82,6 +82,7 @@ __all__ = [
]
import collections as _collections
import copy as _copy
import os as _os
import re as _re
@ -1037,7 +1038,7 @@ class _SubParsersAction(Action):
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__(