Message196616
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') |
|
Date |
User |
Action |
Args |
2013-08-31 04:26:20 | madison.may | set | recipients:
+ madison.may, bethard, eric.araujo, tshepang, geoffreyspear, petri.lehtinen |
2013-08-31 04:26:20 | madison.may | set | messageid: <1377923180.04.0.107142686781.issue14075@psf.upfronthosting.co.za> |
2013-08-31 04:26:20 | madison.may | link | issue14075 messages |
2013-08-31 04:26:19 | madison.may | create | |
|