--- a/src/eric7/Templates/TemplateViewer.py Sun Dec 03 16:44:52 2023 +0100 +++ b/src/eric7/Templates/TemplateViewer.py Sun Dec 03 19:46:34 2023 +0100 @@ -131,7 +131,7 @@ """ Public method to remove all template entries of this group. """ - for name in list(self.entries.keys())[:]: + for name in list(self.entries): self.removeEntry(name) def hasEntry(self, name): @@ -289,7 +289,7 @@ number of lines (integer) and the length of the last line (integer) """ txt = self.template - for var, val in list(varDict.items()): + for var, val in varDict.items(): txt = ( self.__expandFormattedVariable(var, val, txt) if var in self.formatedVariables @@ -727,7 +727,7 @@ # Remove predefined variables from list so user doesn't have to fill # these values out in the dialog. - for v in list(varValues.keys()): + for v in varValues: if v in variables: variables.remove(v) @@ -911,7 +911,7 @@ @return list of all group names (list of strings) """ - groups = sorted(list(self.groups.keys())[:]) + groups = sorted(self.groups) return groups def removeGroup(self, itm):