fix some style errors

This commit is contained in:
Rafael 2017-07-04 18:46:46 +02:00
parent a3972dd9b4
commit 817c27462b

View File

@ -1,6 +1,8 @@
'''
A binary search Tree
'''
class Node:
def __init__(self, label):
@ -45,7 +47,7 @@ class BinarySearchTree:
curr_node = self.root
while True:
if curr_node != None:
if curr_node is not None:
dad_node = curr_node
@ -61,12 +63,12 @@ class BinarySearchTree:
break
def empty(self):
if self.root == None:
if self.root is None:
return True
return False
def preShow(self, curr_node):
if curr_node != None:
if curr_node is None:
print(curr_node.getLabel(), end=" ")
self.preShow(curr_node.getLeft())