|
From: Michael F. <fuz...@vo...> - 2007-05-14 18:23:02
|
Arve Knudsen wrote:
> Hi
> I have a
> problem with configobj/validate (in general a great combination!) that
> keeps cropping up. If I forget to include a comma (',') when defining
> a list value in my configuration file, it is translated into a string
> (even though its specified type is 'list'). The fix is simply to add a
> comma to the end of the configuration value. Is there any reason for
> this behaviour? I find it rather painful since I have to check in my
> own code whether supposed list values from configobj are actually
> lists or strings.
Can you post a minimal config and validation file that illustrates the
problem, and I'll look at it.
In general, lists without commas aren't lists. :-)
I guess if an item is explicitly specified as a list then coercing a
string into a single member list *sounds* like the right behaviour
(rather than raising an error). Anyone else have any opinions?
Michael
http://www.voidspace.org.uk/python/index.shtml
>
> Arve
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Configobj-develop mailing list
> Con...@li...
> https://lists.sourceforge.net/lists/listinfo/configobj-develop
>
|