Message172088
When known and unknown options are given together in the same option string (e.g. -xy) then ArgumentParser behaves in a strange way:
- if the known option is given first (so -k is known and the parser is fed with ['-ku']) then the parsing aborts with "error: argument -k/--known: ignored explicit argument 'u'"
- if the unknown option is given first then both options are treated as unknown and returned in the list of remaining arguments.
This makes it impossible to use parse_known_args for its intended purpose because every single letter option might be interleaved with other unknown options.
I attached a test script that demonstrates this. |
|
Date |
User |
Action |
Args |
2012-10-05 14:53:21 | idank | set | recipients:
+ idank |
2012-10-05 14:53:21 | idank | set | messageid: <1349448801.58.0.783623579173.issue16142@psf.upfronthosting.co.za> |
2012-10-05 14:53:21 | idank | link | issue16142 messages |
2012-10-05 14:53:20 | idank | create | |
|