# l'enfant est-il le fils gauche de son parent ? def is_left_child(self): return self.parent and self is self.parent.left # l'enfant est-il le fils droit de son parent ? def is_right_child(self): return self.parent and self is self.parent.right