This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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')
History
Date User Action Args
2013-08-31 04:26:20madison.maysetrecipients: + madison.may, bethard, eric.araujo, tshepang, geoffreyspear, petri.lehtinen
2013-08-31 04:26:20madison.maysetmessageid: <1377923180.04.0.107142686781.issue14075@psf.upfronthosting.co.za>
2013-08-31 04:26:20madison.maylinkissue14075 messages
2013-08-31 04:26:19madison.maycreate