New submission from Lucas Cimon <lucas.ci...@gmail.com>:
The test I am going to add to test_argparse.py: def test_whitespace_help(self): parser = self._get_parser() parser.add_argument( '--foo2', action='store_true', help=' ') parser.add_argument( 'bar2', type=float, help=' ') parser.format_help() # raises an IndexError ---------- components: Library (Lib) messages: 355336 nosy: Lucas Cimon priority: normal severity: normal status: open title: argparse: Specifying a whitespace-only help message to a positional arg triggers an IndexError when displaying --help versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38584> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com