Argparse本身不支持此类使用。最有效的方法是检查并检查解析后是否满足这些类型的条件:import argparseparser = argparse.ArgumentParser()parser.add_argument('-b')parser.add_argument('-c')args = parser.parse_args()required_together = ('b','c')# args.b will be None if b is not providedif not all([getattr(args,x) for x in required_together]): raise RuntimeError("Cannot supply -c without -b")