Streamlining searches for keys in dicts