HandlerList#
- class snake.core.handlers.base.HandlerList(*args)[source]#
Bases:
UserList
Represent a Chain of Handler, that needs to be apply to a simulation.
Methods
__init__
append
S.append(value) -- append value to the end of the sequence
clear
copy
count
extend
S.extend(iterable) -- extend sequence by appending elements from the iterable
Create a HandlerList from a configuration.
index
Raises ValueError if the value is not present.
insert
S.insert(index, value) -- insert value before index
pop
Raise IndexError if list is empty or index is out of range.
remove
S.remove(value) -- remove first occurrence of value.
reverse
S.reverse() -- reverse IN PLACE
Serialize the handlerList as a list of dictionary.
sort
Serialize the handlerList as a yaml string.
- Parameters:
args (AbstractHandler)
- classmethod from_cfg(cfg)[source]#
Create a HandlerList from a configuration.
- Parameters:
- Return type: