return cmp(x['Type'], y['Type'])
else:
return rc
- q.sort(mycmp)
+ q.sort(key=mycmp)
error = None
# copy of q
def mycmp(b1, b2):
return cmp(bs[b1], bs[b2])
- bl.sort(mycmp)
+ bl.sort(key=mycmp)
f.seek(0)
f.truncate(0)
return cmp(r1.time, r2.time)
else:
return pri_diff
- q.requests.sort(mycmp)
+ q.requests.sort(key=mycmp)
ret = q.requests[0]
return ret
return cmp(r1.time, r2.time)
else:
return pri_diff
- q.requests.sort(mycmp)
+ q.requests.sort(key=mycmp)
ret = q.requests[0]
q.requests = q.requests[1:]
return ret