Re:Tools I use: argparse builder
by mapgrep on Thursday October 08, 2020 @09:21AM
(#24718845)
Better solution would be to clean up the argparse API. For example why is the explanatory text argument “description” when you call the parser constructor (argparse.ArgumentParser) but “help” when you call the argument constructor (parser.add_argument)? Also why are the docs for nargs (whose options I always forget) so buried in the argparse docs?
[ Parent
| on HN ]
Re:Tools I use: argparse builder
by metalliqaz on Thursday October 08, 2020 @12:19PM
(#24720590)
"description" and "help" are different things.
The docs are open source, you can fix it and send a request a pull!
No, I don't see any functional difference between the explanatory text for the argument and the explanatory text for the program. They could both accurately be called "help" or "description," but for some reason the original author did not want to choose. (I agree the dictionary definition of the words are different, but in this context there is no functional difference.)
Also, your first sentence explains why I don't do what you suggest in your second sentence :-) Some people may not agree with my reasoning (which is obviously their right), not worth the trouble to figure out how to submit a patch and then risk having it rejected.
Re:Tools I use: argparse builder
by metalliqaz on Thursday October 08, 2020 @01:12PM
(#24721302)
The "help" is just one component of each argument/option's description, which also includes the short/long syntax guide.