[issue9026] argparse subcommands not printed in the same order they were added

2010-07-23 Thread Javier Collado
Javier Collado added the comment: The hasattr expressions were added to TestHelpFormattingMetaclass because: - A new attribute (subparsers_signature) was added in test classes that wasn't used in the past. - The new test classes didn't make use of some of the already in place

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-21 Thread Javier Collado
Javier Collado added the comment: Just for the record, please find attached an uglier patch for python < 2.7 that doesn't have the same problems as the first one I uploaded and passes all the test cases (tested with python 2.6). -- Added file: http://bugs.python.org/file177

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-21 Thread Javier Collado
Javier Collado added the comment: Despite trunk.diff can be successfully applied to py3k branch, please find attached the patch generated from py3k branch. -- Added file: http://bugs.python.org/file17731/py3k.diff ___ Python tracker <h

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-21 Thread Javier Collado
Changes by Javier Collado : Removed file: http://bugs.python.org/file17705/ordered_subcommands.diff ___ Python tracker <http://bugs.python.org/issue9026> ___ ___ Pytho

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-21 Thread Javier Collado
Javier Collado added the comment: Finally I had to use an OrderedDict as suggested by R. David Murray because it wasn't safe to rely on _choices_actions in HelpFormatter class (i.e. previous patch wasn't valid): - _choices_actions attribute is only present in _SubParsersAction class

[issue9026] [argparse] Subcommands not printed in the same order they were added

2010-06-21 Thread Javier Collado
Javier Collado added the comment: Working on it. -- ___ Python tracker <http://bugs.python.org/issue9026> ___ ___ Python-bugs-list mailing list Unsubscribe: