Skip to content

Instantly share code, notes, and snippets.

@larsyencken
Created June 21, 2012 02:10
Show Gist options
  • Save larsyencken/2963450 to your computer and use it in GitHub Desktop.
Save larsyencken/2963450 to your computer and use it in GitHub Desktop.
Infinitely nested lazy dictionary
from collections import defaultdict
def rabbit_hole_dict():
"Infinitely nested lazy dictionary."
return defaultdict(rabbit_hole_dict)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment