d0n added the comment:

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

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21805>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to