Proposition to improve global_map api
Playing with the map for the first time let to these ideas:
- introduce some symetrie
global_map['counters']
should return a node which can for instance be used as argument in global_map.find_children()
e.g. global_map.find_children(global_map['counters'])
yields the following:
!!! === TypeError: 'NoneType' object is not iterable === !!!
- return objects not ids
global_map.find_children('counters')
yields a list of ids while it it would be much more helpful to have the objects or references to the objects directly. E.g. lets try to get the first counter that is found by find_children
, as I see it today I have to write
global_map[global_map.find_children('counters')[0]]['instance']().counters
which is not too intuitive . Just a small side-remark: I know that for the counters there is a get_counters_iter
but here I am thinking about some more general.