paul j3 added the comment:
Looks like this behavior is intentional. This subclass adds a '%(default)s'
string to the help lines if:
if '%(default)' not in action.help:
if action.default is not SUPPRESS:
defaulting_nargs = [OPTIONAL, ZERO_OR_MORE]
if action.option_strings or action.nargs in defaulting_nargs:
help += ' (default: %(default)s)'
So it adds the default if it is an `optional`, or a `positional` with '*' or
'?'.
A `default` value for a required positional (including '+') does not make
sense, since the user input always overwrites the default.
(I recommend closing this issue).
----------
nosy: +paul.j3
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue15613>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com