[New-bugs-announce] [issue4458] getopt.gnu_getopt() loses dash argument

Yevgen Muntyan report at bugs.python.org
Sat Nov 29 06:04:00 CET 2008


New submission from Yevgen Muntyan <muntyan at tamu.edu>:

If you feed a dash as an argument to getopt.gnu_getopt() then it gets
lost, because the code only checks if the argument starts with a dash,
not if it's more than a dash (unlike getopt.getopt() which is correct).

Example:

>>> import getopt
>>> getopt.gnu_getopt('-', '')
([], [])
>>> getopt.getopt('-', '')
([], '-')

----------
components: Library (Lib)
messages: 76583
nosy: muntyan
severity: normal
status: open
title: getopt.gnu_getopt() loses dash argument
type: behavior
versions: Python 2.5

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


More information about the New-bugs-announce mailing list