|
From: Stefan P. <sap...@gm...> - 2011-01-05 14:26:17
|
Hi all, I created a clone of ConfigObj on Google Code (http://code.google.com/r/pafcu-configobj/) where I will put any fixes and improvements to ConfigObj and Validator that I can come up with. Right now the only thing I have added is an improved list syntax allowing you to specify what type list members should have. You can also specify whether a tuple or list should be used. Now you can e.g. define a tuple containing ints between 1 and 10 by doing mylist = list(type="integer(min=1, max=10)", is_tuple=True) This should also work for custom types. In theory we could now get rid of all the XXX_list types, but for backwards compatibility I have left them in for now. They are a convinient short-hand notation, but at the very lest they should be renamed so they match their corresponding non-list type (e.g. rename int_list -> integer_list OR integer -> int). I also left in the top-level is_list() and is_tuple() functions which have the old behaviour for backwards compatibility. Old tests are passed and I added some new ones to check that the new syntax also works as expected. -- Stefan Parviainen |