Closed Doomerdinger closed 2 years ago
load_yaml
uses two wrapper classes, YamlListWrapper
and YamlDictWrapper
to allow dotted access to elements. To this end, the actually retrieved element is wrapped within one of these classes depending on its type.
For now, element access is correctly implemented. To enable your use case, you would need to implement a wrapper for the iterator returned via __iter__()
as well. Otherwise, the info that a wrapper is desired is lost. I will have a look...
Your change seems to make this work properly
Fixed via #318
I've notice that if I call (from python code, not within a xacro file)
load_yaml
the dot accessor does not work in for loops.Given this yaml file:
The following will not work correctly:
It will complain that
'dict' has no value 'val'
However, the following will work fine
Calling this code directly is not the intended use case, so this may not be worth addressing.