argparse
argparse copied to clipboard
可选参数的option应该怎么写?
比如:OPT_BOOLEAN('t', "test", &test, "test only", NULL, 0, 0), 我想命令行参数中-t带与不带参数均可正常解析能实现吗
boolean 不需要参数,只是 flag 存在与否来表示 true/false 但目前实现好像带参数也行..