Open MehrdadBabazadeh opened 1 month ago
I would also vote for using a dictionary instead of a list, so it is easier to access a specific event in case the user wants to modify in.
I would also vote for using a dictionary instead of a list, so it is easier to access a specific event in case the user wants to modify in.
The one advantage of a list over a dictionary is the ordering in a list. So if we are appending to a list then the events are in some order. We can use an "OrderedDict" object to get both
To be honest, I don't know if the ordering is that important.
Ordering is not super important, and Python's dict is an OrderedDict
since Python 3.6
As discussed in the PR #4254,
set_event
should be renamed because of misleading._Originally posted by @kratman in https://github.com/pybamm-team/PyBaMM/pull/4254#discussion_r1672332716_