SilentGhost <michael.mischurow+...@gmail.com> added the comment:

issue is in the wording: "Long options which require an argument
should be followed by an equal sign ('=')." What if the argument is
optional? Then by definition it is not required, but as my example shows
omitting the equal sign, would produce the error. 

I'd suggest that the docs should read something along these lines: "Long
options which accept an argument should be followed by an equal sign
('='). Passing an argument to an option without an equal sign is illegal."

Basically, it's not clear that "optional" arguments should be passed
like this:
>>> getopt.getopt('--testing='.split(), '', ['testing'])
Note the difference with my previous example.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6977>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to