pub fn prepare_python_actor(
actor_obj: &Bound<'_, PyAny>,
config: Option<&Bound<'_, PyAny>>,
) -> Result<ActorId>Expand description
Prepares a Python actor for registration and returns its final actor ID.
Applies optional config overrides and stores a weak reference to the Python instance used for
method dispatch. Missing or unreadable attributes are ignored, and non-boolean log_events or
log_commands values leave the existing settings unchanged. When neither the config nor
DataActor.__init__ supplies an ID, the runtime class name replaces the shared default so
subclasses that skip the base initializer still receive distinct IDs.
ยงErrors
Returns an error if the actor cannot be extracted, its configured actor_id is neither an
[ActorId] nor a valid ID string, its class-derived ID is invalid, or its Python instance
cannot be weakly referenced.