Steven Bethard <steven.beth...@gmail.com> added the comment:

Thinking about it a bit more, it strikes me that maybe you could get the 
behavior you want by declaring two parsers, one with just optionals, and one 
with just positionals. Then:

optional_args, remaining_args = optionals.parse_known_args()
args = positionals.parse_args(remaining_args)
vars(args).update(vars(optional_args))

Basically, you first parse out all the optional arguments, then you parse out 
the positional arguments from what's left after the optional arguments are 
stripped out. This approach seems to work for your t14.py.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14191>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to