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 d0n
Recipients bethard, d0n, r.david.murray
Date 2014-06-20.05:30:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1403242213.74.0.427698659311.issue21805@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks for your reply. It seems you quite good understood my use case =) and I get your point. Also, I just did not mention your (far more easier method) of accomplishing my goal. 
Indeed, where I use that kind of switching I conditionally change the help text as well. So the actual pice of code I use to satisfy my use case now, taking your advice into practice, looks like the following:

parser.add_argument('--verbose', action='store_const', const=not defaults['verbose'], help='switch on/off verbosity (is '+str(defaults['verbose'])+')')

I quite often use that "config - argparse switch" combination and till now I was doing it far more complicated I do by now :D
Thank you very much for your fast assistance and considering how easy it really is to do what I had in mind I agree with you decision to decline this feature request.

kind regards
History
Date User Action Args
2014-06-20 05:30:13d0nsetrecipients: + d0n, bethard, r.david.murray
2014-06-20 05:30:13d0nsetmessageid: <1403242213.74.0.427698659311.issue21805@psf.upfronthosting.co.za>
2014-06-20 05:30:13d0nlinkissue21805 messages
2014-06-20 05:30:13d0ncreate