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 15:03:26
|
> Ok - so we just special case the top level and restrict scalars to > before any sections. That's not so bad :-) > > Should Section.__setitem__ raise an error if you attempt this, (bearing > in mind that normally a new addition would be appended to the end of > sequence) - or should it just put the values in the right place. > > I guess the second option is the right one. Yes, it would be too restrictive to stop the user from adding scalars altogether once a section has been added. > This means the ``write`` > method needs to check all the members and write out the scalars first. > *sigh* Or else you could have two sequences, one for scalars and one for subsections. Or maybe even an automatic "__scalars__" subsection that's always first, and the scalars go in there. > (This means it no longer necessarily obeys ``sequence``). It obeys order of scalars, and order of subsections, but all scalars always come before all subsections, that's the only exception. > Au contraire my friend - I only started writing ConfigObj 4 on your > promptings - so you *have* been here from the start. Ah, ok, I thought you were referring to previous versions of ConfigObj. > Which is why I'm surprised this didn't come up before... Assumptions, assumptions... ;-) > Anyway - think I can sort it. Glad to hear that. :-) -- 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 |