summaryrefslogtreecommitdiff
path: root/collect/bst.py
diff options
context:
space:
mode:
Diffstat (limited to 'collect/bst.py')
-rw-r--r--collect/bst.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/collect/bst.py b/collect/bst.py
index 9d65259..8602ce6 100644
--- a/collect/bst.py
+++ b/collect/bst.py
@@ -520,12 +520,12 @@ class BinarySearchTree(object):
return x
path = self.parent_path(node)
- assert path[-1]
+ assert path[-1] is not None
assert path[-1] == node
path = path[:-1]
path.reverse()
for ancestor in path:
- assert ancestor
+ assert ancestor is not None
if node != ancestor.right:
return ancestor
node = ancestor