def compareAddressEq(self, addr1, addr2):
        "Checks if two addresses are equal, considering local/useable associations"
        if addr1 is None: return addr2 is None
        if addr2 is None: return False
        try:
            if addr1.addressDetails == addr2.addressDetails:
                return True
        except AttributeError:
            # Cannot directly compare address details elements; try more sophisticated checks
            pass
        if isinstance(addr1, ActorAddress) and \
           isinstance(addr1.addressDetails, ActorLocalAddress):
            if isinstance(addr2, ActorAddress) and \
               isinstance(addr2.addressDetails, ActorLocalAddress):
                return addr1.addressDetails == addr2.addressDetails
            try:
                return (addr1.addressDetails.generatingActor == self._thisActorAddr and
                        self._managed[addr1.addressDetails.addressInstanceNum] and
                        self._managed[addr1.addressDetails.addressInstanceNum].addressDetails ==
                        addr2.addressDetails)
            except AttributeError:
                # Cannot compare these details... must not be equivalent addresses
                return False
        if isinstance(addr2, ActorAddress) and \
           isinstance(addr2.addressDetails, ActorLocalAddress):
            try:
                return (addr2.addressDetails.generatingActor == self._thisActorAddr and
                        self._managed[addr2.addressDetails.addressInstanceNum] and
                        self._managed[addr2.addressDetails.addressInstanceNum].addressDetails ==
                        addr1.addressDetails)
            except __HOLE__:
                # Cannot compare these details... must not be equivalent addresses
                return False
        # IncomPARable!!
        return False
dataset/ETHPy150Open godaddy/Thespian/thespian/system/addressManager.py/ActorAddressManager.compareAddressEq