Make SemanticParent
explicitly a MutableMapping[str, Semantic]
#588
Labels
enhancement
New feature or request
Right now we can
for node in some_composite:
and iterate over the child node instances, and quickly look atsome_composite.child_labels
to see all the keys. It would be much clearer to just explicitly follow the mutable mapping pattern and usefor node in some_composite.values()
andsome_composite.keys()
.I haven't thought deeply about the side effects this might have, but naively I expect it to work fine. It is a bunch of leg work to go through and modify all the existing invokations of for-loops, since they'd suddenly be looping over keys rather than values, but while nit-picky these changes should be straightforward.
The text was updated successfully, but these errors were encountered: