|
From: Entity R. <ent...@gm...> - 2011-01-04 19:05:06
|
Wouldn't you mean: conf['mylist'] = [1,2,3] Otherwise you are feeding the object a string. On Jan 4, 2011, at 11:01 AM, Stefan Parviainen <pa...@ik...> wrote: > On Tue, Jan 4, 2011 at 5:03 PM, David Hostetler <neg...@gm...> wrote: >> config["foo"] = '1,2' is Python code!! > OK, it seems clear that my point is not getting across at all. It > seems difficult to convey what I'm trying to say over the internet, so > after this I'm giving up on this point, and will simply continue to > use a workaround in my own program. > > Consider the spec: > myint = integer > mylist = list > > Assume conf is of type ConfigObj using the above mentioned spec. > > conf['myint'] = '1' > conf[mylist'] = '1,2,3' > > After validation myint will be converter to integer while mylist will > _not_ be converted to a list. I simply do not understand why one is > converted but the other isn't. You may very well be right, and I'm > wrong, and I see little point in continuing to argue about this weird > behaviour, especially since there's a simple workaround that I already > use in my programs. > > -- > Stefan Parviainen > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, and, > should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop |