From: Jeremy Hylton <jeremy@alum.mit.edu> Date: Fri, 3 Mar 2000 20:43:57 +0000 (+0000) Subject: allow comments beginning with ; in key: value as well as key = value X-Git-Tag: v1.6a1~298 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=820314ea954963937ee51190ea916b1f54361d0f;p=python allow comments beginning with ; in key: value as well as key = value --- diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py index aac9b69192..e1ce9ddc7e 100644 --- a/Lib/ConfigParser.py +++ b/Lib/ConfigParser.py @@ -358,7 +358,7 @@ class ConfigParser: if mo: optname, vi, optval = mo.group('option', 'vi', 'value') optname = string.lower(optname) - if vi == '=' and ';' in optval: + if vi in ('=', ':') and ';' in optval: # ';' is a comment delimiter only if it follows # a spacing character pos = string.find(optval, ';')