Option with optional argument
问题 Suppose that I have My program Usage: myprog [options] Options: -h, --help Show this screen. --version Show version. --files=<arg> Files. [default: foo.txt] I would like to distinguish in my code: --files not specified. --files specified, but with no argument to accept the default. --files myfile , i.e. --files specified with custom argument. With the current docstring I can either Not specify --files . Specify --files with an argument. So I'm missing: The option to specify --files without an