3 ms·
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 (argp
by mapgrep 6y ago
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?
- metalliqaz 6y ago"description" and "help" are different things. The docs are open source, you can fix it and send a request a pull!
- mapgrep 6y agoNo, 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.
- metalliqaz 6y agoThe "help" is just one component of each argument/option's description, which also includes the short/long syntax guide.