where required. At some places it's not. Also, "if foo in some_dict.keys()" is unnecessarily slow. Replaced with "if foo in some_dict". I left "for key in some_dict.keys()" alone; "for key in some_dict" is equivalent but not always obvious.
where required. At some places it's not. Also, "if foo in some_dict.keys()" is unnecessarily slow. Replaced with "if foo in some_dict". I left "for key in some_dict.keys()" alone; "for key in some_dict" is equivalent but not always obvious.