Q:

printing max depth in Binary search tree

I am trying to obtain the max depth of a binary search tree however I believe the tree is counting wrong. 
my code:
    def BST_maxdepth(root):
        curdepth = [1]
        maxdepth = [1]
        if root is None:
            return -1
        else:
            curdepth[0] = 1
            maxdepth[0] = 1
            if root.left is not None or root.right is not None:
                curdepth[0] += 1
                if curdepth[0] > maxdepth[0]:
                    maxdepth[0] = curdepth[0]
                BST_maxdepth(root.left)
                BST_maxdepth(root.right)
        return maxdepth[0]

classes & BST:
class Node:
    def __init__(self,value):
        self.right = None
        self.left = None
        self.value = value

def BST_Insert(root, node):     # root --> root of tree or subtree!
    if root.value is None:
        root = node             # beginning of tree
    else:
        if root.value > node.value:     # go to left
            if root.left is None:
                root.left = node
            else:
                BST_Insert(root.left, node)

        if root.value < node.value:    # go to right
            if root.right is None:
                root.right = node
            else:
                BST_Insert(root.right, node)

tests:
r = Node(8)

a = Node(5)
b = Node(2)
c = Node(1)
d = Node(3)
e = Node(7)

output:
2
expected output:
4

A:

Why not something like...
def BST_maxdepth(root, depth=0):
    if root is None:
        return depth
    return max(BST_maxdepth(root.left, depth+1),
               BST_maxdepth(root.right, depth+1))

