def KeyLEQ(key1, key2):
 if ((key1 is None) or (key2 is None)):
  return True
 return (key1 <= key2)

def KeyLEQ ( key1 , key2 ) : if ( ( key1 is None ) or ( key2 is None ) ) : return True return ( key1 <= key2 )
compare two keys for less-than-or-equal-to .