def __cmp__(self, other):
        try:
            for name in "url", "text", "tag", "attrs":
                if getattr(self, name) != getattr(other, name):
                    return -1
        except __HOLE__:
            return -1
        return 0
dataset/ETHPy150Open Masood-M/yalih/mechanize/_html.py/Link.__cmp__