paul j3 <ajipa...@gmail.com> added the comment:
I was thinking of a refactoring that included the ', '.join(...) loop, but on further thought your refactoring might be enough for the case I raised. For example: def _format_option_with_args(self, option_string, args_string): if option_string.startswith('--'): return '%s %s' % (option_string, args_string) return '%s' % option_string would produce a -f, --foo FOO something and def _format_option_with_args(self, option_string, args_string): return option_string would produce -f, --foo something I wonder if this refactoring merits some mention in the documentation. Or maybe the GnuStyleLongOptionsHelpFormatter subclass is enough of an example. The details of how other formatter subclasses work aren't documented, but they are available to developers who can read the code. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42980> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com