Message184174
If nargs=2, type=float, an argv like '1e4 -.002' works, but '1e4 -2e-3' produces the same error as discussed here. The problem is that _negative_number_matcher does not handle scientific notation. The proposed generalize matcher, r'^-.+$', would solve this, but may be overkill.
I'm not as familiar with optparse and other argument processes, but I suspect argparse is different in that it processes the argument strings twice. On one loop it parses them, producing an arg_strings_pattern that looks like 'OAA' (or 'OAO' in these problem cases). On the second loop is consumes the strings (optionals and positionals). This gives it more power, but produces problems like this if the parsing does not match expectations. |
|
Date |
User |
Action |
Args |
2013-03-14 17:09:24 | paul.j3 | set | recipients:
+ paul.j3, amcnabb, bethard, eric.smith, eric.araujo, r.david.murray, gfxmonk, andersk, abacabadabacaba, gdb, nelhage, drm, davidben, skilletaudio, Christophe.Guillon, danielsh |
2013-03-14 17:09:24 | paul.j3 | set | messageid: <1363280964.04.0.502431739559.issue9334@psf.upfronthosting.co.za> |
2013-03-14 17:09:24 | paul.j3 | link | issue9334 messages |
2013-03-14 17:09:23 | paul.j3 | create | |
|