More nest Python nested dictionaries.

Posted by clutch on Stack Overflow See other posts from Stack Overflow or by clutch
Published on 2010-03-24T17:48:11Z Indexed on 2010/03/24 17:53 UTC
Read the original article Hit count: 274

Filed under:
|
|

After reading http://stackoverflow.com/questions/635483/what-is-the-best-way-to-implement-nested-dictionaries-in-python why is it wrong to do:

c = collections.defaultdict(collections.defaultdict(int))

in python? I would think this would work to produce

{key:{key:1}}

or am I thinking about it wrong?

© Stack Overflow or respective owner

Related posts about python

Related posts about collections