Re: [Rest2web-develop] Changed all references to value "tests" into value "checks"...
Brought to you by:
mjfoord
From: Nicola L. <ni...@te...> - 2005-07-21 10:52:51
|
> That won't work either. If you have values, then a section, then more > values - if the section *isn't* indented then there's no way of > indicating that the section has ended. So let's not allow mixing stuff like that (see later). > If that doesn't matter to you (you have no values *after* the section) > then you can *write* the config file without indentation. (ConfigObj > will read it correctly) - but when it writes out it will indent sections. Not good, confusing, inconsistent. [impl. details snipped] > I hope that enough of this makes sense. I think I can sort it out anyway > - but sections still need to be indented by ``write`` as far as I can tell. Please detach from the implementation for a moment, and look at the big picture. Scalar values and (sub)sections at the same level MUST have the same indent, it's too confusing otherwise. There are only two ways to get this, that I can see: 1) introduce a end-of-section header, like ZConfig does; now we're not INI file format compatible anymore. Not good. 2) *only* allow scalar values *before* subsections in each section. Then the end of the section is marked by the beginning of the next (sub)section, or the end of the file. I think that 2) is an acceptable limitation to live with. After all, grouping scalar values before *or* between *or* after sections, without explicitly putting them into real sections, introduces a kind of implicit sections that I don't like at all. Does that grouping have any meaning? Who knows? I find 2) much preferable than having different indents for scalar values and (sub)sections at the same level. Whatever you do, please don't do this. I'm serious. -- Nicola Larosa - ni...@te... When I was growing up, my parents used to say to me, "Tom, finish your dinner - people in China are starving." But after sailing to the edges of the flat world for a year, I am now telling my own daughters, "Girls, finish your homework - people in China and India are starving for your jobs." -- Thomas L. Friedman, New York Times, April 2005 |