Earlier quoted context omitted.
True, you do get string interpolation but the comment support in ConfigParser isn't very good. Although actually they may have fixed some of that in Python 3 but I'm still using workarounds. To be clear, I am not suggesting using JSON for config, I think that would be my last choice. My point is that ConfigParser isn't really an alternative to rolling your own if you want decent validation etc (those spec files are h…
What's wrong with the comment support? You can't have comments at the end of a line, but that's sort of the nature of supporting arbitrary strings as values. I don't want my users to have to quote or escape special characters if they happen to want to use them. They're not programmers. # The note to display note = Our #1 customer! rather than name = Our \#1 customer # The note to display. or name = "Our #1 customer"…
Comments are simply ignored. You can't read them. You might want to read a commented config file in, make a change to a setting and then write that out. You can't do that. But you can write comments using the 'allow_no_value=True' hack, as long as long as you put it in a section.
> You can't have comments at the end of a line
You can. You need to use ';' for inline comments and you must proceed it with whitespace. Are your users ready for that?