3 ms·
Why not just use a recursive default dict? http://kentsjohnson.com/kk/00013.html http://kentsjohnson.com/kk/00013.html
by tantalor 15y ago
Why not just use a recursive default dict?
http://kentsjohnson.com/kk/00013.html http://kentsjohnson.com/kk/00013.html
- tantalor 15y agoHere is a simple implementation that I swear by, https://github.com/tantalor/megaera/blob/master/megaera/recursivedefaultdict.py https://github.com/tantalor/megaera/blob/master/megaera/recu...