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 14:04:03 +02:00
commit 4ad8f66559
3 changed files with 84 additions and 4 deletions

View file

@ -83,6 +83,7 @@ __all__ = [
]
import collections as _collections
import copy as _copy
import os as _os
import re as _re
@ -1066,7 +1067,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__(