R. David Murray added the comment:

I don't understand your use case.  As a user I would expect a switch to either 
set the value to true or to false, not to toggle it based on some default that 
might be changed in a configuration file.

But, your method of accomplishing your goal looks fine to me, except that it is 
unnecessarily verbose.  You can just write:
  
   const=not config_defaults['verbose']

You might also want to make the help text conditional, so that the user knows 
whether the switch is going to turn verbosity on or off.

You *could* write your own store_opposite action routine, but that seems like 
overkill, especially if you decide to also make the help text conditional.

Given how simple this is to do, I'm rejecting the feature request.

----------
nosy: +r.david.murray
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
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