[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

Anders Kaseorg report at bugs.python.org
Sun Feb 6 20:53:44 CET 2011


Anders Kaseorg <andersk at mit.edu> added the comment:

That would be a good first step.

I continue to advocate making that mode the default, because it’s consistent with how every other command line program works[1], and backwards compatible with the current argparse behavior.

As far as documentation for older versions, would it be reasonable to un-deprecate optparse until argparse becomes a suitable replacement?  There are still lots of programmers working in Python 2.7.

[1] bethard’s msg128047 is confusing positional arguments with option arguments.  All UNIX commands that accept option arguments have no trouble accepting option arguments that begin with -.  For example, ‘grep -e -pattern file’ is commonly used to search for patterns beginning with -.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9334>
_______________________________________


More information about the Python-bugs-list mailing list