This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Sworddragon
Recipients Sworddragon
Date 2015-10-03.20:58:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1443905883.43.0.512702237453.issue25307@psf.upfronthosting.co.za>
In-reply-to
Content
I'm noticing some things on the argparse help output that can maybe enhanced. Here is a testcase that produces an example output:

#!/usr/bin/python3 -BEOObbs
# coding=utf-8
import argparse
arguments = argparse.ArgumentParser()
arguments.add_argument('-t', '--test1', action = 'store_true', help = 'Description1')
arguments.add_argument('--test2', action = 'store_true', help = 'Description2')
arguments.add_argument('-u', '--test3', choices = ['choice1', 'choice2'], help = 'Description3', nargs = '+')
arguments.parse_args()


- A way to automatically indent names or to give the user a way to control the indentation would make them easier to read. For example --test2 is here under a short option but it would be easier to read if it would have an offset to be directly under --test1.
- The line "-u {choice1,choice2} [{choice1,choice2} ...], --test3 {choice1,choice2} [{choice1,choice2} ...]" shows the choices for every name while they are the same. Maybe they can be shortened to be shown only on the last name like "-u, --test3 {choice1,choice2} [{choice1,choice2} ...]".
History
Date User Action Args
2015-10-03 20:58:03Sworddragonsetrecipients: + Sworddragon
2015-10-03 20:58:03Sworddragonsetmessageid: <1443905883.43.0.512702237453.issue25307@psf.upfronthosting.co.za>
2015-10-03 20:58:03Sworddragonlinkissue25307 messages
2015-10-03 20:58:02Sworddragoncreate