Message169712
As a workaround for this missing feature,
the negative number matching regexp can be used for allowing arguments starting with '-' in arguments of option flags.
We basically do:
parser = argparse.ArgumentParser(...)
parser._negative_number_matcher = re.compile(r'^-.+$')
This allow cases such as @andersk:
$ a2x --asciidoc-opts --safe gitcli.txt
where '--safe' is an argument to '--asciidoc-opts'
As this behavioral change is quite simple, couldn't the requested feature be implemented like this with an optional setting to the ArgumentParser contructor? |
|
Date |
User |
Action |
Args |
2012-09-02 17:58:45 | Christophe.Guillon | set | recipients:
+ Christophe.Guillon, amcnabb, bethard, eric.smith, eric.araujo, r.david.murray, andersk, gdb, nelhage, drm, davidben, skilletaudio |
2012-09-02 17:58:45 | Christophe.Guillon | set | messageid: <1346608725.55.0.443462171772.issue9334@psf.upfronthosting.co.za> |
2012-09-02 17:58:45 | Christophe.Guillon | link | issue9334 messages |
2012-09-02 17:58:44 | Christophe.Guillon | create | |
|