New submission from Yevgen Muntyan <[EMAIL PROTECTED]>:

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 <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4458>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to