[Rest2web-develop] "none" and "multiple" checks are no more :-)
Brought to you by:
mjfoord
From: Nicola L. <ni...@te...> - 2005-08-16 07:07:36
|
configobj.py ------------ Actually added the RepeatSectionError class. ;-) 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. 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. -- Nicola Larosa - ni...@te... Python is the best thing I've seen in 30 years of computing for pedogogical and productive purposes. Only when I want speed do I see a need for something else. -- Chuck Allison, June 2005 |