Daniel Kahn Gillmor <d...@fifthhorseman.net> added the comment:
this is a common enough question, and enough people want this behavior, that 
argparse should supply it.

I'm imagining that:  

   type='bool'

would be fine for triggering this behavior, instead of the shadowing that could 
happen with:

   type=bool

so if type='bool' is supplied, the following things would happen:

 * argparse could use strtobool to interpret the incoming string
 * the default metavar would look something like "{true,false}"
 * followon packages like argcomplete could enumerate the range of different 
values that strtobool accepts

This is still english-specific -- but it's because strtobool is 
english-specific, and fixes in strtobool would automatically fix type='bool' 
here.

----------
nosy: +dkg

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

Reply via email to