Re: [Rest2web-develop] Down with writein
Brought to you by:
mjfoord
From: Nicola L. <ni...@te...> - 2005-08-04 11:29:16
|
> The main use case was to allow the creation of a ConfigObj that > represented part of a file. It meant making an arbitrary decision about > what to do if the ConfigObj was changed (the keys in the object no > longer match the keys in the file). On the basis of YAGNI I figured I > could lose it... Go ahead, lighter is better. ;-) > Would you prefer it if I just kept all comments, even if separated by > blank lines ? Yes. :-) Best if you could keep blank lines too. :-D > I thought this could end up associating comments with the wrong value. > As a side effect it means that there is no way of providing a comment > for the *first* key/section. It will all be swallowed up by initial_comment. Why don't you do away with the notions of initial_comment, final_comment, and associating comments with config items, and instead keep all non-data lines just as they are? You could do this by using a third sequence, say "self.comments", and interleaving its elements with self.scalars and self.sections somehow. -- Nicola Larosa - ni...@te... If there are a few shark attacks in Florida - and a graphic movie - suddenly every swimmer is worried. More people are killed every year by pigs than by sharks, which shows you how good we are at evaluating risk. -- Bruce Schneier, May 2005 |