def defaultorder(self):
    return self.attrb1, self.attrb2

def __lt__(self, other):
    return self.defaultorder() < other.defaultorder()
bar.sort(reverse=True)
How to perform double sort inside an array?