Fixed some optimized reference copy errors
svn: r14148
This commit is contained in:
parent
e16a75f449
commit
1bc7a15a27
@ -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):
|
||||
"""
|
||||
|
@ -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():
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user