'Recurse through the parse tree to figure out if any sublists are dirty'

def is_dirty(self):

    if self.dirty:
        return True
    return any(((isinstance(x, list) and x.is_dirty()) for x in self))
