Being able to validate the list items using choices=servers
below is nice.
servers = [ \"ApaServer\", \"BananServer\", \"GulServer\", \"SolServ
I don't think, that you can enforce this with argparse
, but I also don't see any reason to do so. Just document in help
that duplicates are ignored. If the user passes duplicate arguments to --only
, just let her do so, and ignore the duplicate argument when processing the option arguments (e.g. by turing the list into a set()
before processing).