New submission from Denver Coneybeare <denver.coneybe...@gmail.com>:
Currently, when a subparser is added to an argparse.ArgumentParser the list of subparsers are stored in the built-in dict type. When these subparsers are listed when -h is given on the command line they are showed in the order returned from the dictionary's keys() method, which is undefined order. Instead of showing them in undefined order, it would be preferred to show them at least in the order in which they were added. This can be done trivially be replacing the dict with a collections.OrderedDict. A patch is attached. ---------- components: Library (Lib) files: argparse.patch keywords: patch messages: 113124 nosy: benjamin.peterson, denversc priority: normal severity: normal status: open title: argparse: use OrderedDict to store subparsers type: behavior versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file18418/argparse.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9537> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com