Message413136
Hm, the change helps indeed. I did this in my code:
p = argparse.ArgumentParser(description='…', add_help=False)
g = p.add_argument_group('Options')
g.add_argument('-h', action='help', help='show this help message and exit')
g.add_argument(………
g = p.add_argument_group('Arguments')
g.add_argument('file', ………
args = p.parse_args()
Maybe adjust the documentation to match? As it stands, https://docs.python.org/3/library/argparse.html is somewhat helpful, but https://docs.python.org/3/howto/argparse.html is totally confusing. |
|
Date |
User |
Action |
Args |
2022-02-12 16:13:23 | mirabilos | set | recipients:
+ mirabilos, rhettinger, eric.araujo |
2022-02-12 16:13:23 | mirabilos | set | messageid: <1644682403.76.0.115384619393.issue46700@roundup.psfhosted.org> |
2022-02-12 16:13:23 | mirabilos | link | issue46700 messages |
2022-02-12 16:13:23 | mirabilos | create | |
|