Message112258
Looking at the test fixtures that exercise argparse, it appears that the intended behavior when '-' is not a prefix_char is to accept a doubling of any of the prefix_chars for long arguments. That is, if '-' is not present in prefix_chars but ':' is, then an argument like '::help' would be a valid long argument.
I'm attaching a patch which fixes the originally reported problem as follows:
* If '-' is in prefix_chars, then the help and version arguments are '-h', '--help', '-v', '--version'
* If '-' is not in prefix_chars, then the first char in prefix_chars is used to lead the option, e.g., '+h', '++help', '+v', '++version' if prefix_chars starts with '+'.
Catherine Devlin is also sprinting here at PyOhio and will have a test fixture separately. |
|
Date |
User |
Action |
Args |
2010-08-01 02:40:20 | ted.turocy | set | recipients:
+ ted.turocy, bethard, doughellmann |
2010-08-01 02:40:20 | ted.turocy | set | messageid: <1280630420.05.0.348992253922.issue9444@psf.upfronthosting.co.za> |
2010-08-01 02:40:18 | ted.turocy | link | issue9444 messages |
2010-08-01 02:40:17 | ted.turocy | create | |
|