This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author SilentGhost
Recipients SilentGhost, georg.brandl
Date 2009-09-23.14:30:41
SpamBayes Score 1.6448304e-10
Marked as misclassified No
Message-id <1253716242.58.0.721807050187.issue6977@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-09-23 14:30:42SilentGhostsetrecipients: + SilentGhost, georg.brandl
2009-09-23 14:30:42SilentGhostsetmessageid: <1253716242.58.0.721807050187.issue6977@psf.upfronthosting.co.za>
2009-09-23 14:30:41SilentGhostlinkissue6977 messages
2009-09-23 14:30:41SilentGhostcreate