[issue37227] Wrong parse long argument

2019-06-11 Thread chr0139
New submission from chr0139 : I have this script import argparse parser = argparse.ArgumentParser() group = parser.add_mutually_exclusive_group() group.add_argument('-l', '--list', action='store_true', help="show help") group.add_argument('-u',

[issue37227] Wrong parse long argument

2019-06-11 Thread chr0139
chr0139 added the comment: I think --li is not the same argument as --list So I expect that parser.parse_args(['-l']) or parser.parse_args(['--list']) should be only two options which should leads to the result Namespace(list