kimgr added inline comments.
================ Comment at: tools/clang-format/git-clang-format:323 allowed_extensions = frozenset(allowed_extensions) - for filename in dictionary.keys(): + for filename in list(dictionary.keys()): base_ext = filename.rsplit('.', 1) ---------------- EricWF wrote: > EricWF wrote: > > kimgr wrote: > > > This should not be necessary for iteration -- in Python3 it returns a > > > generator instead of a list, but generators can be iterated. > > This was done by the 2to3 tool. I'll have to see what it thinks it was up > > to. But I agree this seems wrong. > Ah, so this is needed because in python 3 it's a runtime error to remove > items from a dictionary while iterating over the keys. So we have to make a > copy first. Oh, I see, I didn't catch that. Carry on. https://reviews.llvm.org/D30773 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits