Route.cost#
- Route.cost(msg)[source]
Returns a function that computes the cost of the route for a given object.
The object must be dict-like (i.e., it must have a __dict__ method).
- Parameters:
msg (Any) – The object for which to compute the cost (e.g., a message).
- Returns:
The function that computes the cost of the route.
- Return type:
float