summaryrefslogtreecommitdiffstats
path: root/Lib/argparse.py
diff options
context:
space:
mode:
authorSteven Bethard <steven.bethard@gmail.com>2011-03-27 12:04:03 (GMT)
committerSteven Bethard <steven.bethard@gmail.com>2011-03-27 12:04:03 (GMT)
commit4ad8f6655992776954ac81975e8697e03c276f37 (patch)
treebc37220582efdfbbe47864010408bbce21ee21c9 /Lib/argparse.py
parent5df4762911860f71b7690793c172c054b69c72f5 (diff)
parent8a6a198abff504067fb74b669c672901a97a44b6 (diff)
downloadcpython-4ad8f6655992776954ac81975e8697e03c276f37.zip
cpython-4ad8f6655992776954ac81975e8697e03c276f37.tar.gz
cpython-4ad8f6655992776954ac81975e8697e03c276f37.tar.bz2
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.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py
index 0abfb36..79f1fe5 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__(