Any reason why this wouldn't work?

>>> from collections import defaultdict
>>> def rdict(*args, **kw):
...     return defaultdict(rdict, *args, **kw)
...
>>> d = rdict()
>>> d[1][2][3][4][5] # ...
defaultdict(<function rdict at 0x61370>, {})


~ Daniel

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to