paul j3 added the comment: I don't anticipate any backward compatibility issues with the proposed patch. But at the same time it feels almost too trivial of an issue to merit a patch.
A short metavar such as `metavar="ID"' or even `metavar="_"' would be nearly as compact, and still leave an indicator of the required argument (in usage as well as the help). I'm not even sure if disallowing a blank metavar is worth the change. As indicated before I've only seen this extra space problem when I or others suggest the blank metavar as a way making a more compact help invocation. That has come up frequently on SO, but I can't find a relevant bug/issue. https://stackoverflow.com/a/18280876/901925 - here I suggest suppressing the help line and putting custom info in the group's description. https://stackoverflow.com/questions/9642692/argparse-help-without-duplicate-allcaps - suggests a help formatter subclass So maybe the bigger issue is, can we make it easier to customize the the help invocation formatting? Things to consider: - metavar affects both the help line and usage - setting help width and indentation is a messy part of the formatter - there are unittests for long and long-long-longer option names to test these indentation issues. As with some other help formatter issues, we are treading a fine line between making trivial patches, and substantive ones that make it cleaner and more robust. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29626> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com