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

I created Issue 15427 for the parse_args documentation bug. So let's make this 
issue just about parsing intermixed arguments.

Yes, if someone would like to provide a patch for this, please create a method 
"parse_intermixed_args" rather than adding a boolean flag parameter. It should 
be basically equivalent to this code:

args, remaining_args = optionals.parse_known_args()
args = positionals.parse_args(remaining_args, args)

Except that it should give proper error messages. There should be some tests to 
make sure both that it parses things as expected and that it gives error 
messages as expected.

----------
assignee: docs@python -> 
components:  -Documentation
title: argparse: nargs='*' doesn't get out-of-order positional parameters -> 
argparse doesn't allow optionals within positionals
versions: +Python 3.4 -Python 2.7, Python 3.2, Python 3.3

_______________________________________
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