def emit(self, *args, **kwargs):
        """Calls all the connected slots with the provided args and kwargs unless block is activated"""

        if self._blocked: return

        for slot_index, slot in enumerate(list(self._slots)):
            slot(*args, **kwargs)
            
            if slot.max_calls == 0:
                del self._slots[slot_index]
Calls all the connected slots with the provided args and kwargs unless block is activated
recipes/Python/580764_Simple_signal_library_similar_PyQT/recipe-580764.py