Tal's comments from Rietveld review (see msg220391);
529: Does this have to be a separate, new Tk instance? Wouldn't a temporary widget under the current Tk be just as good? Creating a new Tk instance could take a relatively large amount of time time and perhaps also have visual side-effects.
me> better to use original if possible.
545: Here keylist is mutated inside the for loop which iterates over it. This looks like a bug, and in any case should be avoided.
me> looping over invalid. But this is part of repeated check which we should avoid.