title: how to Pass an inequality into a function as a variable, then evaluate it?
body: <pre><code>def bubble_up(heap, inequality):
    print heap, 'bubbling up', heap[-1]
    heap_length = len(heap)
    position = heap_length - 1 #heap_length
    parent = int(heap_length/2) - 1
    print 'parent =', heap[parent]
    while heap[position] inequality heap[parent]:
  </code></pre>
  
  <p>Well that doesn't work!<br>
  I want to pass an inequality in, and have it evaluated, and I want it to be clear what I've done in 6 months time.
  Also I want it to be fast.  If it's quantumly better just to write two functions with a changed sign, please shout at me why this is.</p>