[issue9444] argparse does not honor prefix_chars when adding default options

Doug Hellmann report at bugs.python.org
Sun Aug 1 16:05:41 CEST 2010


Doug Hellmann <doug.hellmann at gmail.com> added the comment:

I was actually surprised that prefix_chars didn't allow *any* of those characters to indicate an option.  For example, a program on Unix might use options that start with '-', but also support '/' as a prefix under Windows.  If that's the intended behavior, that's OK, and maybe the docs can be made more specific.

It does, however, open the question of how to pick the prefix to use for automatically-generated options.  Maybe the current behavior is best after all, so the programmer disabling the '-' prefix character realizes they need to handle the help and version options explicitly.

----------

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


More information about the Python-bugs-list mailing list