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

It *would* be a backwards incompatible change. Currently, if I have a parser 
with both a "--foo" and a "--bar" option, and my user types "--foo --bar", they 
get an error saying that they were missing the argument to "--foo". Under your 
proposal, the "--foo" option will now silently consume the "--bar" option 
without an error. I know this is good from your perspective, but it would 
definitely break some of my scripts, and I imagine it would break other 
people's scripts as well.

As I keep saying, I'm happy to add your alternative parsing as an option 
(assuming you provide a patch), but I really don't think it's the right thing 
to do by default. Most command line programs don't have options that take other 
option-like things as arguments (which is the source of your problem), so in 
most command line programs, people want an error when they get an option they 
don't recognize or an option that's missing its argument. Under your proposal, 
more such errors will pass silently and will have to be caught by additional 
code in the script.

----------

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

Reply via email to