Several times (even several in a row) I\'ve been bitten by the defaultdict bug: forgetting that something is actually a defaultdict and treating it like a regular dictionary
You may still convert it to an normal dict.
d = collections.defaultdict(list) d = dict(d)