[New-bugs-announce] [issue13966] Add disable_interspersed_args() to argparse.ArgumentParser

László Attila Tóth report at bugs.python.org
Wed Feb 8 08:49:28 CET 2012


New submission from László Attila Tóth <laszlo.attila.toth at gmail.com>:

If someone ports his code from optparse to argparse, there is a limit, that options and non-options can be mixed by default, and this behaviour cannot be disabled easily, an extra '--' argument is required in the command line.

In some cases it is much prettier to explicitly disable this, as was available in the deprecated optparse module.

I attach a patch that does this, adds disable_interspersed_args() to argparse.ArgumentParser.

----------
components: Library (Lib)
files: argparse.patch
keywords: patch
messages: 152839
nosy: Laszlo.Attila.Toth
priority: normal
severity: normal
status: open
title: Add disable_interspersed_args() to argparse.ArgumentParser
versions: Python 2.7
Added file: http://bugs.python.org/file24449/argparse.patch

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


More information about the New-bugs-announce mailing list