[issue12662] Add support for duplicate options in configparser

Brian Curtin report at bugs.python.org
Fri Aug 5 21:11:30 CEST 2011


Brian Curtin <brian at python.org> added the comment:

This would break existing config files, including some of my own. 

It would also require that you have some end delimiter on every item in order to handle the event that someone duplicates options, otherwise the following would likely behave badly in your application

[sect]
opt=first
opt=second

This would give you "firstsecond" that you'd somehow need to parse. Sometimes if I'm testing out options, like I want to check how "second" works, I'll quickly just do it as above. With a change like this, I couldn't do that, I'd be forced to comment out the first line, or add a delimiter and split on it.

----------
nosy: +brian.curtin

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12662>
_______________________________________


More information about the Python-bugs-list mailing list