diff --git a/src/Simple/_SimpleTable.py b/src/Simple/_SimpleTable.py index f72262f4f..2ea093e3d 100644 --- a/src/Simple/_SimpleTable.py +++ b/src/Simple/_SimpleTable.py @@ -100,7 +100,7 @@ class SimpleTable(object): columns.append(col) # end of unicode fix self.__columns = list(copy.copy(columns)) - self.__sort_vals = [[]]*len(self.__columns) + self.__sort_vals = [[] for i in range(len(self.__columns))] def set_callback(self, which, callback): """ diff --git a/src/plugins/gramplet/AgeStats.py b/src/plugins/gramplet/AgeStats.py index 8d6ec1c48..6ed4d9499 100644 --- a/src/plugins/gramplet/AgeStats.py +++ b/src/plugins/gramplet/AgeStats.py @@ -84,9 +84,9 @@ class AgeStatsGramplet(Gramplet): age_dict = defaultdict(int) mother_dict = defaultdict(int) father_dict = defaultdict(int) - age_handles = [[]] * self.max_age - mother_handles = [[]] * self.max_mother_diff - father_handles = [[]] * self.max_father_diff + age_handles = [[] for i in range(self.max_age)] + mother_handles = [[] for i in range(self.max_mother_diff)] + father_handles = [[] for i in range(self.max_father_diff)] text = "" count = 0 for p in self.dbstate.db.iter_people(): diff --git a/src/plugins/gramplet/WhatsNext.py b/src/plugins/gramplet/WhatsNext.py index de28d20af..714a0aeba 100644 --- a/src/plugins/gramplet/WhatsNext.py +++ b/src/plugins/gramplet/WhatsNext.py @@ -111,7 +111,7 @@ class WhatNextGramplet(Gramplet): # parent's other spouses, the ancestors of my grandchildren's spouses, # the ancestors of my sibling's spouses etc. ancestors = [[default_person]] - ancestors_queue = [[[default_person]]] + [[]] * self.ANCESTOR_DELAY + ancestors_queue = [[[default_person]]] + [[] for i in range(self.ANCESTOR_DELAY)] # List of lists of families of relatives in currently processed # distance. We go up one level of distance in each round. @@ -131,12 +131,12 @@ class WhatNextGramplet(Gramplet): # beginning of this class definition, but the principle remains the # same. families = [] - families_queue = [[]] * self.ANCESTOR_DELAY + families_queue = [[] for i in range(self.ANCESTOR_DELAY)] # List of spouses to add to ancestors list so we track ancestors of # spouses, too, but delayed as defined by the parameter. spouses = [] - spouses_queue = [[]] * self.SPOUSE_DELAY + spouses_queue = [[] for i in range(self.SPOUSE_DELAY)] while (ancestors or families): # (Other) families of parents