Adds DefaultOrderedDict to twitter.common.collections
Review Request #697 — Created July 16, 2014 and discarded — Latest diff uploaded
This new class is meant to be a substitute for defaultdict(). I wanted to use it in pants because I'm trying to get to the bottom of what seems to be non-deterministic behavior in ordering the classpath for jvm compiles between different machines both working from head of master in the same repo. I also added some tests for OrderedDict while I was at it. One part of the design I wasn't so sure about was how to pass in the function for __missing__(). I used a setter and a create() factory method to take the place of passing a function to the constructor because I believe OrderedDict() already has a use for the constructor arg.
Added unit tests. CI is started at https://travis-ci.org/twitter/commons/builds/30104031
Loading file attachments...