Message196616
| Author |
madison.may |
| Recipients |
bethard, eric.araujo, geoffreyspear, madison.may, petri.lehtinen, tshepang |
| Date |
2013年08月31日.04:26:19 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1377923180.04.0.107142686781.issue14075@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Any chance this issue could be reopened? I ran across this bit of code today when working on coverage for argparse. I'd like to again propose the removal or modification of _get_args. I understand that it's there primarily to be overridden, but even that's not useful. Because _get_kwargs uses obj.__dict__.items(), overriding _get_args to return an iterable of positional args results in those arguments being output twice when repr() is called (once formatted as a positional arg and once formatted as a keyword arg). You end up with strings like the below. I just can't think of any situation where this behavior would be desirable.
Action(['--foo', '-a', '-b'], 'b', option_strings=['--foo', '-a', '-b'], dest='b', nargs='+', const=None, default=42, type='int', choices=[1, 2, 3], help='HELP', metavar='METAVAR') |
|