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 serhiy.storchaka
Recipients berker.peksag, serhiy.storchaka, steven.daprano
Date 2016-07-26.04:50:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1469508633.22.0.552058071662.issue27619@psf.upfronthosting.co.za>
In-reply-to
Content
> On my Centos system, getopt ignores leading and trailing whitespace on long options.

This is not related to how getopt_long in C works with leading and trailing whitespace on long options, but is related to how command-line utility getopt parses a list of long options.

My answer: if you don't want a space in your long_option, don't put a space in there. There is no a bug in Python, and the patch just complicates the code in attempt to fix one particular user error.
History
Date User Action Args
2016-07-26 04:50:33serhiy.storchakasetrecipients: + serhiy.storchaka, steven.daprano, berker.peksag
2016-07-26 04:50:33serhiy.storchakasetmessageid: <1469508633.22.0.552058071662.issue27619@psf.upfronthosting.co.za>
2016-07-26 04:50:33serhiy.storchakalinkissue27619 messages
2016-07-26 04:50:32serhiy.storchakacreate