import UserList
class MyList(UserList.UserList):
def __eq__(self,other):
return map(lambda x,y: x==y, self,other)
def __ne__(self,other):
return map(lambda x,y: x!=y, self,other)
def __lt__(self,other):
return map(lambda x,y: x<y, self,other)
def __le__(self,other):
return map(lambda x,y: x<=y, self,other)
def __gt__(self,other):
return map(lambda x,y: x>y, self,other)
def __ge__(self,other):
return map(lambda x,y: x>=y, self,other)
a = [ 3, 7, 10, -2]
b = [ 2, 5, 15, 20]
c = a < b # c = [0, 0, 1, 1]