diff --git a/huffman_py/Tree.py b/huffman_py/Tree.py index e69783a..368fe87 100644 --- a/huffman_py/Tree.py +++ b/huffman_py/Tree.py @@ -50,12 +50,12 @@ class Tree(object): L = list() L.append(self.root) while len(L) > 0: - traitement = L.pop(0) - self.nodes.append(traitement) - if traitement.left: - L.append(traitement.left) - if traitement.right: - L.append(traitement.right) + treatment = L.pop(0) + self.nodes.append(treatment) + if treatment.left: + L.append(treatment.left) + if treatment.right: + L.append(treatment.right) def set_id(self): # Give unique identifiers to every node in a tree @@ -94,8 +94,8 @@ class Tree(object): return self - def seek(self, node): + def seek(self, node_to_seek): for node in self.nodes: - if node == node: + if node == node_to_seek: return node return None