Issue #9026: Fix order of argparse sub-commands in help messages.

This commit is contained in:
Steven Bethard 2011-03-27 13:53:53 +02:00
parent a6e0b4f2ed
commit 8a6a198abf
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
@ -1041,7 +1042,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__(