R. David Murray <rdmur...@bitdance.com> added the comment:

Optparse left you to parse the arguments:

>>> import optparse
>>> p = optparse.OptionParser()
>>> p.add_option('--test', action="store_true")
<Option at 0x96521bc: --test>
>>> p.parse_args(['--test', 'foo', '--', 'foo2'])
(<Values at 0x97020a4: {'test': True}>, ['foo', 'foo2'])

As you can see, the 'foo' before the '--' is one of the returned arguments.  So 
argparse is behaving exactly the same way as optparse in this instance, except 
that, as I said, it is *parsing* the arguments.

----------

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

Reply via email to