News for hackers. Stuff that matters.
Re:Python Tips and Traps by birken on Monday January 19, 2015 @04:20PM (#8914154)
Oops, messed this up (too late to edit). Thanks choochootrain for the correction:

  >>> NestedDD = lambda: collections.defaultdict(NestedDD)
  >>> nested_dd = NestedDD()
  >>> nested_dd['a']['b']['c']['d'] = 'hello'
does the proper thing.

There are no comments on this comment yet.