(cls, message, target_class=None)
Broadcast ``message`` to all actors of the specified ``target_class``.

        If no ``target_class`` is specified, the message is broadcasted to all
        actors.

        :param message: the message to send
        :type message: any

        :param target_class: optional actor class to broadcast the message to
        :type target_class: class or class name
Broadcast ``message`` to all actors of the specified ``target_class``.
Broadcast message to all actors of the specified target_class .
def broadcast(cls, message, target_class=None):
        """
        Broadcast ``message`` to all actors of the specified ``target_class``.

        If no ``target_class`` is specified, the message is broadcasted to all
        actors.

        :param message: the message to send
        :type message: any

        :param target_class: optional actor class to broadcast the message to
        :type target_class: class or class name
        """
        if isinstance(target_class, str):
            targets = cls.get_by_class_name(target_class)
        elif target_class is not None:
            targets = cls.get_by_class(target_class)
        else:
            targets = cls.get_all()
        for ref in targets:
            ref.tell(message)
def broadcast ( cls , message , target_class = None ) : if isinstance ( target_class , str ) : targets = cls . get_by_class_name ( target_class ) elif target_class is not None : targets = cls . get_by_class ( target_class ) else : targets = cls . get_all ( ) for ref in targets : ref . tell ( message )