(self, message)
return self.on_receive(message)
Handles messages sent to the actor.
Handles messages sent to the actor.
Handles messages sent to the actor .
def _handle_receive(self, message):
        """Handles messages sent to the actor."""
        if isinstance(message, messages._ActorStop):
            return self._stop()
        if isinstance(message, messages.ProxyCall):
            callee = self._get_attribute_from_path(message.attr_path)
            return callee(*message.args, **message.kwargs)
        if isinstance(message, messages.ProxyGetAttr):
            attr = self._get_attribute_from_path(message.attr_path)
            return attr
        if isinstance(message, messages.ProxySetAttr):
            parent_attr = self._get_attribute_from_path(message.attr_path[:-1])
            attr_name = message.attr_path[-1]
            return setattr(parent_attr, attr_name, message.value)
        return self.on_receive(message)
def _handle_receive ( self , message ) : if isinstance ( message , messages . _ActorStop ) : return self . _stop ( ) if isinstance ( message , messages . ProxyCall ) : callee = self . _get_attribute_from_path ( message . attr_path ) return callee ( * message . args , * * message . kwargs ) if isinstance ( message , messages . ProxyGetAttr ) : attr = self . _get_attribute_from_path ( message . attr_path ) return attr if isinstance ( message , messages . ProxySetAttr ) : parent_attr = self . _get_attribute_from_path ( message . attr_path [ : - 1 ] ) attr_name = message . attr_path [ - 1 ] return setattr ( parent_attr , attr_name , message . value ) return self . on_receive ( message )