Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| """ | |
| A really stupid python template language inspired by coffeekup, markaby. | |
| Do not use this code, it will ruin your day. A byproduct of insomnia. | |
| TL;DR | |
| ----- | |
| This module defines a template language that allows us to do: | |
| d = Doc() |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!