Re: [Rest2web-develop] Changed all references to value "tests" into value "checks"...
Brought to you by:
mjfoord
From: Michael F. <mi...@pc...> - 2005-07-22 08:38:48
|
Nicola Larosa wrote: [snip..] > > 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. > Sorry to harp on about this - but I'm not *convinced* that the implementation is yet right. I *hope* it is. The current rule is basically : A new section must be indented relative to it's parent section. Sections in the root section aren't indented (since they don't have a parent). Scalar values must come before sub-sections. This means config files look like : key = value key2 = value2 [ section ] key = value key2 = value2 [sub-section] key = value key2 = value2 [ section 2 ] key = value key2 = value2 [sub-section] key = value key2 = value2 *But* - in 'section', 'sub-section' is as the same level as 'key' and 'key2'. Is that ok ? Best Regards, Fuzzy http://www.voidspace.org.uk/python |