diff --git a/data_structures/binary_tree/binary_search_tree.py b/data_structures/binary_tree/binary_search_tree.py index eca99e53f..ee6aeb482 100644 --- a/data_structures/binary_tree/binary_search_tree.py +++ b/data_structures/binary_tree/binary_search_tree.py @@ -79,9 +79,7 @@ class Node: @property def is_right(self) -> bool: - if self.parent and self.parent.right: - return self == self.parent.right - return False + return self.parent and self is self.parent.right class BinarySearchTree: