You may as well remove the entire "vi" concept from ConfigParser. Since "vi" can be *only* a '=' or ':', then you aren't truly checking anything in the "if" statement. Further, "vi" is used nowhere else, so that variable and the corresponding regex group can be nuked altogether. IMO, I'm not sure why the ";" comment form was initially restricted to just one option format in the first place. Cheers, -g On Fri, 3 Mar 2000, Jeremy Hylton wrote: > Update of /projects/cvsroot/python/dist/src/Lib > In directory bitdiddle:/home/jhylton/python/src/Lib > > Modified Files: > ConfigParser.py > Log Message: > allow comments beginning with ; in key: value as well as key = value > > > Index: ConfigParser.py > =================================================================== > RCS file: /projects/cvsroot/python/dist/src/Lib/ConfigParser.py,v > retrieving revision 1.16 > retrieving revision 1.17 > diff -C2 -r1.16 -r1.17 > *** ConfigParser.py 2000/02/28 23:23:55 1.16 > --- ConfigParser.py 2000/03/03 20:43:57 1.17 > *************** > *** 359,363 **** > optname, vi, optval = mo.group('option', 'vi', 'value') > optname = string.lower(optname) > ! if vi == '=' and ';' in optval: > # ';' is a comment delimiter only if it follows > # a spacing character > --- 359,363 ---- > optname, vi, optval = mo.group('option', 'vi', 'value') > optname = string.lower(optname) > ! if vi in ('=', ':') and ';' in optval: > # ';' is a comment delimiter only if it follows > # a spacing character > > > _______________________________________________ > Python-checkins mailing list > Python-checkins@python.org > http://www.python.org/mailman/listinfo/python-checkins > -- Greg Stein, http://www.lyra.org/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4