From: Eli C. <el...@co...> - 2015-01-09 19:30:46
|
This is not currently possible, unfortunately. Your suggestion seems good. It reads well, though it's not technically backwards-compatible, since it eliminates the ability for people to have config options called __name__ within a section. With that being said, this might be an extreme-enough edge case that we'd be okay with it. At the very least it seems worth considering. I've created an issue for this in our Github: https://github.com/DiffSK/configobj/issues/81 - Eli On Wed, Jan 7, 2015 at 1:29 AM, Darren Spruell <pha...@gm...> wrote: > Greetings, > > Have been enjoying the validator functionality in ConfigObj greatly > (configspecs). > > I have a case where my configuration has a section which may contain > many subsections, and I'd like the ability to apply a validator to the > name of the subsections (they should only be integers in the range of > 100 to 10000000). Is this currently possible in ConfigObj? Otherwise, > something that could be made possible? > > Thinking something along the lines of a key name in the configspec of > __name__, e.g.: > > [foo] > [[__many__]] > __name__ = integer(100,10000000) > field1 = string > field2 = integer(0,100) > > -- > Darren Spruell > pha...@gm... > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming! The Go Parallel Website, > sponsored by Intel and developed in partnership with Slashdot Media, is > your > hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials and more. Take a > look and join the conversation now. http://goparallel.sourceforge.net > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > |