diff options
author | Steven Bethard <steven.bethard@gmail.com> | 2011-03-27 14:04:03 +0200 |
---|---|---|
committer | Steven Bethard <steven.bethard@gmail.com> | 2011-03-27 14:04:03 +0200 |
commit | 4ad8f6655992776954ac81975e8697e03c276f37 (patch) | |
tree | bc37220582efdfbbe47864010408bbce21ee21c9 /Lib/argparse.py | |
parent | 5df4762911860f71b7690793c172c054b69c72f5 (diff) | |
parent | 8a6a198abff504067fb74b669c672901a97a44b6 (diff) | |
download | cpython-git-4ad8f6655992776954ac81975e8697e03c276f37.tar.gz |
Issue #9026: Fix order of argparse sub-commands in help messages. (Merged from 3.2.)
Diffstat (limited to 'Lib/argparse.py')
-rw-r--r-- | Lib/argparse.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py index 0abfb36659..79f1fe5a6b 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -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__( |