[docs] [issue14191] argparse doesn't allow optionals within positionals
paul j3
report at bugs.python.org
Sat May 3 03:23:26 CEST 2014
paul j3 added the comment:
I encountered a conflict when merging this patch with http://bugs.python.org/issue15112. In my first testcase, 'cmd' and 'rest' failed the 'required' test in phase one of 'intermixed'. That's because 15112 postponed parsing them (with nargs=0/suppressed).
I got around that by temporarily setting the 'required' attribute to False.
The whole issue of when (or even whether) a positional that is satisfied with 0 arguments, is consumed, is a bit messy.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14191>
_______________________________________
More information about the docs
mailing list