I hereby claim:
- I am pde on github.
- I am pde (https://keybase.io/pde) on keybase.
- I have a public key whose fingerprint is A56B A27D 94B8 96BE EB64 0129 494F 21B9 D67C 4D21
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst | |
index c6b2bf6..15f2fe8 100644 | |
--- a/Doc/library/argparse.rst | |
+++ b/Doc/library/argparse.rst | |
@@ -429,13 +429,15 @@ should not be line-wrapped:: | |
including argument descriptions. | |
:class:`ArgumentDefaultsHelpFormatter` automatically adds information about | |
-default values to each of the argument help messages:: | |
+default values to each of the argument help messages, unless they already |
diff --git a/Lib/argparse.py b/Lib/argparse.py | |
index 209b4e9..254b803 100644 | |
--- a/Lib/argparse.py | |
+++ b/Lib/argparse.py | |
@@ -665,11 +665,11 @@ class ArgumentDefaultsHelpFormatter(HelpFormatter): | |
def _get_help_string(self, action): | |
help = action.help | |
- if '%(default)' not in action.help: | |
+ if '%(default)' not in help and '%(help_default)' not in help: |
sudo apt-get install python-pip | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
The following package was automatically installed and is no longer required: | |
libtrio2 | |
Use 'sudo apt autoremove' to remove it. | |
The following additional packages will be installed: | |
python-pip-whl | |
The following packages will be upgraded: |