behaviour_dict¶
this module defines a custom dict
BehaviourDict is a subclass of dict and modifies mainly the __setitem__ method by calling a setter method for the given key if the setter method has been registered before
-
class
roqba.utilities.behaviour_dict.
BehaviourDict
(*args, **kwargs)[source]¶ defines a dictionary-class with custom setter methods
upon every __setitem__ call it checks if it has registered setter methods and calls them with the given value
-
read_or_create_saved_behaviours
(name='.saved_behaviours')[source]¶ reads saved behaviours if there are, otherwise creates them
-
save_current_behaviour
(name=None, write_to_file=True)[source]¶ adds current behaviour to the saved behaviours dict
-