docs: def detach(self, listener):
          """Detach a listening object so that it won't receive any events
          anymore."""
          if listener in self.listeners:
              self.listeners.remove(listener)