Author pde
Recipients pde
Date 2016-11-19.00:17:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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 and

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:

The patch was written against 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:09pdesetrecipients: + pde
2016-11-19 00:17:09pdesetmessageid: <>
2016-11-19 00:17:09pdelinkissue28742 messages
2016-11-19 00:17:08pdecreate