Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def send(self, sender, **named):
- """
- Send signal from sender to all connected receivers.
- If any receiver raises an error, the error propagates back through send,
- terminating the dispatch loop, so it is quite possible to not have all
- receivers called if a raises an error.
- Arguments:
- sender
- The sender of the signal Either a specific object or None.
- named
- Named arguments which will be passed to receivers.
- Returns a list of tuple pairs [(receiver, response), ... ].
- """
- responses = []
- if not self.receivers:
- return responses
- for receiver in self._live_receivers(_make_id(sender)):
- response = receiver(signal=self, sender=sender, **named)
- responses.append((receiver, response))
- return responses
Add Comment
Please, Sign In to add comment