mirabilos <[email protected]> added the comment:
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.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46700>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com