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
use different idiom:
if 'key' not in d: print "Sorry, no dice!"