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 mirabilos
Recipients eric.araujo, mirabilos, rhettinger
Date 2022-02-12.16:13:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1644682403.76.0.115384619393.issue46700@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2022-02-12 16:13:23mirabilossetrecipients: + mirabilos, rhettinger, eric.araujo
2022-02-12 16:13:23mirabilossetmessageid: <1644682403.76.0.115384619393.issue46700@roundup.psfhosted.org>
2022-02-12 16:13:23mirabiloslinkissue46700 messages
2022-02-12 16:13:23mirabiloscreate