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 jahschwa
Recipients jahschwa
Date 2016-08-14.02:42:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471142568.14.0.155713837509.issue27762@psf.upfronthosting.co.za>
In-reply-to
Content
According to the 2.7 docs at https://docs.python.org/2/library/configparser.html, you can create in-line comments using ";" if it is preceded by white space.

However, if the value of a config option contains a semi-colon, for example "password=my;pass123", then only the first colon will be checked by the parser.

In the config file:
password=my;pass123 ;expires in 2018

Expected value:
my;pass123

Returned value:
my;pass123 ;expires in 2018

This is easily remedied with a while loop, lines 525-529 in the attached patch. Otherwise the docs should be changed to reflect this behavior, but a patch definitely seems more appropriate to me. Python 3.5 gives the expected value when using inline_comment_prefixes=';'.
History
Date User Action Args
2016-08-14 02:42:49jahschwasetrecipients: + jahschwa
2016-08-14 02:42:48jahschwasetmessageid: <1471142568.14.0.155713837509.issue27762@psf.upfronthosting.co.za>
2016-08-14 02:42:48jahschwalinkissue27762 messages
2016-08-14 02:42:47jahschwacreate