summaryrefslogtreecommitdiffstats
path: root/Lib/argparse.py
diff options
context:
space:
mode:
authorSteven Bethard <steven.bethard@gmail.com>2011-03-27 11:53:53 (GMT)
committerSteven Bethard <steven.bethard@gmail.com>2011-03-27 11:53:53 (GMT)
commit8a6a198abff504067fb74b669c672901a97a44b6 (patch)
treed619a9217ffa11fbc51f0f5bdadd73f1898db3c8 /Lib/argparse.py
parenta6e0b4f2ede0613a8780c3e2d8e9387a280afd6c (diff)
downloadcpython-8a6a198abff504067fb74b669c672901a97a44b6.zip
cpython-8a6a198abff504067fb74b669c672901a97a44b6.tar.gz
cpython-8a6a198abff504067fb74b669c672901a97a44b6.tar.bz2
Issue #9026: Fix order of argparse sub-commands in help messages.
Diffstat (limited to 'Lib/argparse.py')
-rw-r--r--Lib/argparse.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py
index e46f919..0ef9f4e 100644
--- a/Lib/argparse.py
+++ b/Lib/argparse.py
@@ -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__(