Skip to content

Commit 3225dbb

Browse files
authored
Update docstring of SimEvent (#2417)
* Update eventlist.py * ruff related fix
1 parent e40075d commit 3225dbb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mesa/experimental/devs/eventlist.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ class SimulationEvent:
3333
function_args (list[Any]): Argument for the function
3434
function_kwargs (Dict[str, Any]): Keyword arguments for the function
3535
36+
37+
Notes:
38+
simulation events use a weak reference to the callable. Therefore, you cannot pass a lambda function in fn.
39+
A simulation event where the callable no longer exists (e.g., because the agent has been removed from the model)
40+
will fail silently.
41+
3642
"""
3743

3844
_ids = itertools.count()

0 commit comments

Comments
 (0)