diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-03-05 12:05:45 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-03-05 12:05:45 (GMT) |
commit | 841b930a41be90c6c05fb4bab8392f50e01d86b7 (patch) | |
tree | 6c681440f0e9b7728d1c56c602e0503f15ed26ab /Lib/argparse.py | |
parent | d79d5b1a50347b06397e160440e6bb9dd5a8ed43 (diff) | |
download | cpython-841b930a41be90c6c05fb4bab8392f50e01d86b7.zip cpython-841b930a41be90c6c05fb4bab8392f50e01d86b7.tar.gz cpython-841b930a41be90c6c05fb4bab8392f50e01d86b7.tar.bz2 |
Issue #17940: Remove redundant code from _Section.format_help()
Output of func(*args) stored in the next line:
item_help = join([func(*args) for func, args in self.items])
_Section.items only used by HelpFormatter._add_item() and it looks
like it doesn't have any side effects.
Patch by Yogesh Chaudhari.
Diffstat (limited to 'Lib/argparse.py')
-rw-r--r-- | Lib/argparse.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Lib/argparse.py b/Lib/argparse.py index cc53841..209b4e9 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -210,8 +210,6 @@ class HelpFormatter(object): if self.parent is not None: self.formatter._indent() join = self.formatter._join_parts - for func, args in self.items: - func(*args) item_help = join([func(*args) for func, args in self.items]) if self.parent is not None: self.formatter._dedent() |