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 pablogsal
Recipients Aaron.Meurer, Daniel.Walsh, Ingo.Fischer, Oz.Tiram, Pavel Raiskup, acucci, adregner, andialbrecht, bethard, bignose, bochecha, dmalcolm, eric.araujo, josh.r, jwilk, louielu, matthewjohn, pablogsal, paul.j3, rhettinger, serhiy.storchaka, sigi, tshepang, zbysz
Date 2018-06-14.20:02:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1529006541.94.0.947875510639.issue14102@psf.upfronthosting.co.za>
In-reply-to
Content
>What would cause that confusion? This is not something that would
>change how ‘argparse’ parses its arguments, so I don't know what
>you're referring to.

The (possible) confusion is the existence of a manpage only available though argparse (`./python foo.py --manpage`) and not systemwide. I am not sure how many people do something like `./python poc_2.py > output && man ./output` to **read** the manpage.

>This is asking that the ‘argparse’ library should have an API to
>create a manual page, for use in the build system.

At this point argparse is user facing in the sense that once configured, it provides functionality for the user of the command line application. My opinion is that it will be weird to have it provide also APIs for creating man pages (which is a developer utility). My humble opinion is that it if argparse starts to provide APIs for usage at install time is not "doing one thing and doing it well".

>The reason to have it in the ‘argparse’ library is that the library
>already knows how to build a single document (the ‘--help’ output)
>from the collection of arguments, so this would be just another
>rendering of that information. It makes sense to have it in the
>‘argparse’ library as an API for other tools to use

Argparse --help makes sense because people expect to use -h or --help with command line tools but IMHO opinion nobody expects --manpage to be the way to read the manpage. I do not know any command line utility that provides its manpage that way. If the argument is using --manpage is the way to generate one, then we are mixing user-facing options with developer ones.

Anyway, this is just my view of the problem, nothing more.
History
Date User Action Args
2018-06-14 20:02:22pablogsalsetrecipients: + pablogsal, rhettinger, bethard, jwilk, eric.araujo, zbysz, dmalcolm, Aaron.Meurer, bignose, andialbrecht, bochecha, tshepang, paul.j3, sigi, Daniel.Walsh, serhiy.storchaka, Ingo.Fischer, adregner, josh.r, Oz.Tiram, acucci, matthewjohn, louielu, Pavel Raiskup
2018-06-14 20:02:21pablogsalsetmessageid: <1529006541.94.0.947875510639.issue14102@psf.upfronthosting.co.za>
2018-06-14 20:02:21pablogsallinkissue14102 messages
2018-06-14 20:02:21pablogsalcreate