Re: [Rest2web-develop] "none" and "multiple" checks are no more :-)
Brought to you by:
mjfoord
From: Michael F. <mi...@pc...> - 2005-08-16 08:16:47
|
Nicola Larosa wrote: > configobj.py > ------------ > > Actually added the RepeatSectionError class. ;-) > Oops *blush*. There's also another change I claimed to have made that I should actually do :-) > validate.py > ----------- > > Deleted the "none" and "multiple" checks, and good riddance, I'd say. ;-) > > Added the None value in Validation.check: now None is an admissible value > for all checks. When specified in the defaults, it affords an easy way to > omit a key from the config without having a real default, making it > effectively optional. > Cool. Nice one. I did some more work on the docs, but still not finished. I need to look over the 'final' implementation - particularly for validate. As always your proofreading will be appreciated. Same applies to module docstrings. I'm going to prepare a release based on this... > > It currently happens that if a section has only scalars with defaults, and > __many__ subsections, it may be omitted from the config, making it optional > too. I like it that way. :-) > > I also updated the validate.txt doc, deleting mentions of the "none" and > "multiple" checks, and adding a mention of None as an admissible value for > all checks. > > I've been able to complete my use case. I now have a good configspec, and > both a complete and (very) minimal config that comply with the configspec. > I'm satisfied with the results, and have no further feature requests. ;-D > > The real test will happen when I integrate it in the code, but that will > have to wait some time. I don't expect problems, apart from the fact that > currently config is traversed with dot (attribute) notation, and all uses > will have to be converted to dict notation. > Ok - adding attribute access would be easy (ConfigObj3 has it). I'd rather not have it as a feature (I think dictionary notation is more appropriate; members are members, not attributes) - but writing a wrapper class would be simple..... (Better to switch to the new way though..) All the best, Fuzzy http://www.voidspace.org.uk/python |