def compareMarkPos(a, b):
 linecmp = cmp(a[0], b[0])
 if linecmp:
  return linecmp
 return cmp(a[1], b[1])

def compareMarkPos ( a , b ) : linecmp = cmp ( a [ 0 ] , b [ 0 ] ) if linecmp : return linecmp return cmp ( a [ 1 ] , b [ 1 ] )
perform in every way identically to l{cmp} for valid inputs .