Message281183
When argparse lists the default values for cli flags and arguments, it shows argparse's view of the internal Pythonic default, not the default behaviour of the program as a whole. This can be wrong in many cases, as documented at https://bugs.python.org/issue27153 and https://github.com/certbot/certbot/issues/3734.
To mitigate this, we should allow the caller to set arbitrary strings that argparse will display to the user as the "default" in the CLI help.
I wrote a first patch to do this via a new "help_default" argument that can be added to argparse actions:
https://gist.github.com/pde/daec08cadc21bca0d62852020887ee13
The patch was written against argparse.py from Python2.7, but seems to apply and run okay against the Python 3.x version. |
|
Date |
User |
Action |
Args |
2016-11-19 00:17:09 | pde | set | recipients:
+ pde |
2016-11-19 00:17:09 | pde | set | messageid: <1479514629.23.0.218870455687.issue28742@psf.upfronthosting.co.za> |
2016-11-19 00:17:09 | pde | link | issue28742 messages |
2016-11-19 00:17:08 | pde | create | |
|