|
From: Michael F. <fuz...@vo...> - 2008-09-07 10:13:43
|
NICK VERBECK wrote:
> There seems to be a bug when trying to reconstruct a dictionary that
> contains a list. The first set of dictionary keys will parse out but
> the values just become the string repr of the rest of the
> dictionary/list.
>
What code are you using to read / write the config?
Dictionaries in values will only be properly converted if you are using
unrepr mode.
Michael
>
> Here is the saved string.
> clusters = "{'name': 'Default Cluster', 'servers': [{'ip':
> '127.0.0.1', 'name': 'Demo Server', 'port': '11211'}]}",
>
> This becomes
>
> config['cluster'] = "{'name': 'Default Cluster', 'servers': [{'ip':
> '127.0.0.1', 'name': 'Demo Server', 'port': '11211'}]}"
>
> This initial def was this
>
> config['clusters'] = [
> {
> 'name': 'Default Cluster',
> 'servers': [
> {
> 'ip': '127.0.0.1',
> 'name': Demo Server',
> 'port': '11211'
> }
> ]
> }
> ]
>
> Hopefully that makes since.
>
>
>
--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/
http://www.trypython.org/
http://www.ironpython.info/
http://www.theotherdelia.co.uk/
http://www.resolverhacks.net/
|