| 657 | return result |
| 658 | |
| 659 | def _expand_help(self, action): |
| 660 | help_string = self._get_help_string(action) |
| 661 | if '%' not in help_string: |
| 662 | return help_string |
| 663 | params = dict(vars(action), prog=self._prog) |
| 664 | for name in list(params): |
| 665 | value = params[name] |
| 666 | if value is SUPPRESS: |
| 667 | del params[name] |
| 668 | elif hasattr(value, '__name__'): |
| 669 | params[name] = value.__name__ |
| 670 | if params.get('choices') is not None: |
| 671 | params['choices'] = ', '.join(map(str, params['choices'])) |
| 672 | return help_string % params |
| 673 | |
| 674 | def _iter_indented_subactions(self, action): |
| 675 | try: |