(self, new_parent)
| 98 | return "\n".join(s) |
| 99 | |
| 100 | def move_to(self, new_parent): |
| 101 | new_path = new_parent.path + "." + str(self.id) |
| 102 | for n in self.descendants: |
| 103 | n.path = new_path + n.path[len(self.path) :] |
| 104 | self.path = new_path |
| 105 | |
| 106 | |
| 107 | if __name__ == "__main__": |