ConfigParser: whitespace leading comment lines

Hello all, I'd like to propose the following change to ConfigParser.py. I won't call it a bug-fix because I don't know the relevant standards. This change will enable multiline comments as follows: [section] item=value ;first of multiline comment ;second of multiline comment Right now the behaviour is In [19]: cfg.get('section','item') Out[19]: 'value\n;second of multiline comment' It's a one-line change. RawConfigParser._read lines 434-437 # comment or blank line? - if line.strip() == '' or line[0] in '#;': + if line.strip() == '' or line.strip()[0] in '#;': continue Regards, Greg Willden (Not a member of python-dev) -- Linux. Because rebooting is for adding hardware.

On Tue, Oct 10, 2006, Greg Willden wrote:
I'd like to propose the following change to ConfigParser.py. I won't call it a bug-fix because I don't know the relevant standards.
Go ahead and submit a patch; it's guaranteed you won't get progress without it. -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ "If you don't know what your program is supposed to do, you'd better not start writing it." --Dijkstra

On Tue, Oct 10, 2006, Greg Willden wrote:
I'd like to propose the following change to ConfigParser.py. I won't call it a bug-fix because I don't know the relevant standards.
Go ahead and submit a patch; it's guaranteed you won't get progress without it. -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ "If you don't know what your program is supposed to do, you'd better not start writing it." --Dijkstra
participants (2)
-
Aahz
-
Greg Willden