Consider the following code: import argparse parser = argparse.ArgumentParser() parser.add_argument('-o', required=True, nargs=1) parser.parse_args(['-h']) Why am I getting the following output even if I said that -o is required? usage: test.py [-h] -o O optional arguments: -h, --help show this help message and exit -o O I would expect the help text to say that -o is required. Continue reading...