|
From: Stefan P. <pa...@ik...> - 2010-12-26 11:49:41
|
I've noticed some issues with how list types are handled in Validate. There are several different list types, including, int_list for integers, string_list for strings, etc. IMHO the list handling could be generalized to be much more useful. Right now there is no easy way to declare a list of e.g. integers with min and max values. You could declare a completely new type, "list_of_ints_min_0_max_10" but in practice it's not really feasible. It's also not easily possible to declare a list containing some custom type. I think an optional argument, type, should be added to the list type, so something like this would be possible: list(type=int(min=0,max=10), min=1, max=2) This would also solve problems with inconsistent naming (integer vs. int_list types). The old types could be kept for backwards compatibility. I've reported one issue related to lists, and three other issues (some with patches) to the Google Code issue tracker at http://code.google.com/p/configobj/issues/ but have not gotten any reaction to them. Is the Google Code tracker the correct place to report bugs? If not, could this be clarified somewhere? -- Stefan Parviainen |