Snippet List
Displays nested lists / dicts / tuples in an aligned hierarchy to make debugging easy. Accepts all variable types, including nested lists with any mixture of tuples / dictionaries / lists / numbers / strings.
Analogous to the PHP print_r($var) function.
- nested
- nested-set
- nested-dict
- print_r
- nested-list
The nested set abstraction is a very nice way to store hierarchical data, for example places, in a database. It provides an easy way to say that Melbourne is within Victoria, which is within Australia, etc.</p>
The calls to addChild() are expensive, so this model is slow to build, and bad if you do frequent updates. If you're building a read-only model though, it's much faster than ForeignKey('self') for determining ancestor/descendent relationships.
- tree
- hierarchy
- nested-set
2 snippets posted so far.