def disconnect(self, slot):
        """Disconnects the slot from the signal"""

        """
        if not isinstance(slot, Slot):
            raise ValueError("Arguments is not slot")
        """
        if slot.signal != self: return

        found = False
        for index, other_slot in enumerate(self._slots):
            if other_slot == slot:
                found = True
                break

        if not found:
            raise Exception("Not valid slot.")
        
        del self._slots[index]
Disconnects the slot from the signal
recipes/Python/580764_Simple_signal_library_similar_PyQT/recipe-580764.py