Private Member Functions | |
def | _get_help_string |
def | _get_help_string |
Help message formatter which adds default values to argument help. Only the name of this class is considered a public API. All the methods provided by the class are considered an implementation detail.
Definition at line 648 of file argparse.py.
def argparse::ArgumentDefaultsHelpFormatter::_get_help_string | ( | self, | |
action | |||
) | [private] |
Reimplemented from argparse::HelpFormatter.
Definition at line 655 of file argparse.py.
00656 : 00657 help = action.help 00658 if '%(default)' not in action.help: 00659 if action.default is not SUPPRESS: 00660 defaulting_nargs = [OPTIONAL, ZERO_OR_MORE] 00661 if action.option_strings or action.nargs in defaulting_nargs: 00662 help += ' (default: %(default)s)' 00663 return help 00664 00665 00666 # ===================== 00667 # Options and Arguments 00668 # =====================
def argparse::ArgumentDefaultsHelpFormatter::_get_help_string | ( | self, | |
action | |||
) | [private] |
Reimplemented from argparse::HelpFormatter.
Definition at line 673 of file argparse.py.
00673 : 00674 help = action.help 00675 if '%(default)' not in action.help: 00676 if action.default is not SUPPRESS: 00677 defaulting_nargs = [OPTIONAL, ZERO_OR_MORE] 00678 if action.option_strings or action.nargs in defaulting_nargs: 00679 help += ' (default: %(default)s)' 00680 return help 00681 00682 00683 # ===================== 00684 # Options and Arguments 00685 # ===================== 00686