So the defaultdict documentation mentions that, if an item is missing, the value returned by default_factory "is inserted in the dictionary for the key, and returned." That's great most of the time, but what I actually want in this case is for the value to be returned but not inserted into the defaultdict.
I figured I could probably subclass defaultdict and override... I guess __missing__? Not sure. What's the best way to go about this?
Thanks in advance.