pifacecommon/interrupts.py
def deregister(self, pin_num=None, direction=None):
        """De-registers callback functions

        :param pin_num: The pin number. If None then all functions are de-registered
        :type pin_num: int
        :param direction: The event direction. If None then all functions for the
                          given pin are de-registered
        :type direction:int
        """
        to_delete = []
        for i, function_map in enumerate(self.pin_function_maps):
            if ( pin_num == None
                 or ( function_map.pin_num == pin_num
                      and ( direction == None
                            or function_map.direction == direction ) ) ):
                to_delete.append(i)
        for i in reversed(to_delete):
            del self.pin_function_maps[i]
def deregister(self, pin_num=None, direction=None):
        """De-registers callback functions

        :param pin_num: The pin number. If None then all functions are de-registered
        :type pin_num: int
        :param direction: The event direction. If None then all functions for the
                          given pin are de-registered
        :type direction:int
        """
        to_delete = []
        for i, function_map in enumerate(self.pin_function_maps):
            if ( pin_num == None
                 or ( function_map.pin_num == pin_num
                      and ( direction == None
                            or function_map.direction == direction ) ) ):
                to_delete.append(i)
        for i in reversed(to_delete):
            del self.pin_function_maps[i]
De-registers callback functions

        :param pin_num: The pin number. If None then all functions are de-registered
        :type pin_num: int
        :param direction: The event direction. If None then all functions for the
                          given pin are de-registered
        :type direction:int