Add to Technorati Favorites

Archive for May, 2012

Autovivification in Python: nested defaultdicts with a specific final type

Saturday, May 26th, 2012 Posted under python, tech. | 11 Comments »

I quite often miss the flexibility of autovivification in Python. That Wikipedia link shows a cute way to get what Perl has: from collections import defaultdict def tree(): return ... Read more..