Skip to content

Lest the whole program be smitten with a curse.

class ParseNode:
    def __init__(self, name):
        self.name = name
        self.parent = None
        self.children = []

    def spirit_of_elijah(self):
        for child in self.children:
            child.parent = self
            child.spirit_of_elijah()

4 Comments