Errors while doing Binary Search in Python . What is wrong with the code?
<pre><code>import math 

def BinarySearch( A , val , low , high ):
    if high &lt; low :
        return -1 #not found 
    mid = low + (high - low ) /2 
    if A[mid] &gt; val:
        return BinarySearch(A,val , low , high )
    if A[mid] &lt; val :
        return BinarySearch(A,val,low,high)
    else: 
        return mid #found 


A = [ 12 , 23 , 2 , 33 , 123 , 4 , 5 , 2 , 54 , 555 , 21 ]
BinarySearch( A , 0 , 0, 10)
</code></pre>

<p>I tried to do Binary Search without using the bisect Module . But it gives an error such as this </p>

<pre><code> File "doubtrob.py", line 8, in BinarySearch
    return BinarySearch(A,val , low , high )
RuntimeError: maximum recursion depth exceeded
</code></pre>
