On 7 Mar 2010, at 19:49, Guido van Rossum wrote: > How would you write the example instead then? Boolean flags are a common enough case that I'd be inclined to add a wrapper method, so you could just say: parser.add_bool_argument('--plot') As you can always fall back to the more general add_argument() call, the wrapper could just handle the usual case (default false, presence of option sets flag to True). So the signature would be pretty simple - something like: def add_bool_argument(self, help=None, dest=None): Mark Russell
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4