|
From: Cameron S. <cam...@cs...> - 2009-10-19 00:10:56
|
On Sun, 18 Oct 2009 12:00:23 pm David Hostetler wrote: > I have to respectfully disagree with your description of a 'nicer' > behavior. > > What you're proposing would break the clean semantic behavior of cfg > parsing and validating. > > If a user deletes a section name, but leaves the key/value pairs that > previously belonged to it, then those key/value pairs *ARE* part of the > preceeding section! What you're asking is for validate to complain about > a scenario that is only a problem in your contorted use case. It is > simultaneously a perfectly valid scenario in other cases. I must respectfully agree with you here. I also like the idea of optionally flagging extra key/value pairs that aren't in the spec, as a way of detecting typos and other errors. I'm using a ConfigObj to parse a file that also gets modified manually, so it happens more often than I'd like. Nice work, Cameron. |