tracks/python/exercises/pov/example.py in trackler-2.2.1.107 vs tracks/python/exercises/pov/example.py in trackler-2.2.1.108
- old
+ new
@@ -39,11 +39,11 @@
if child.label == node:
break
tree.children.append(child.remove(node))
return tree
- def fromPov(self, from_node):
+ def from_pov(self, from_node):
stack = [self]
visited = set()
while stack:
tree = stack.pop(0)
if tree.label in visited:
@@ -53,11 +53,11 @@
return tree
for child in tree.children:
stack.append(child.add(tree.remove(child.label)))
raise ValueError("Tree could not be reoriented")
- def pathTo(self, from_node, to_node):
- reordered = self.fromPov(from_node)
+ def path_to(self, from_node, to_node):
+ reordered = self.from_pov(from_node)
stack = reordered.children
path = [from_node]
while path[-1] != to_node:
try:
tree = stack.pop()