|
From: Michael F. <fuz...@vo...> - 2011-01-04 19:06:29
|
On 04/01/2011 19:01, Stefan Parviainen 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. You have made your point you just don't seem to have understood the responses as to why it doesn't (and shouldn't) work like that. :-) Michael > 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. > -- http://www.voidspace.org.uk/ May you do good and not evil May you find forgiveness for yourself and forgive others May you share freely, never taking more than you give. -- the sqlite blessing http://www.sqlite.org/different.html |