Allow unresolved values in NestedChainMap
#35
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This already works in a single
RecursiveNestedMapping
, but theNestedChainMap
will still throw an error if a recursive bang-string-key ends up pointing to a "dead end", i.e. another, unresolved, bang key.Maybe we'd want to include a "strict mode" for this, so we can enable that for some applications in ScopeSim, where we actually want an error in such a case. Something similar is currently done in some places, i.e. check if something is still a bang key when it should be a float or whatever. So by having a "strict mode" for resolving recursive bang keys, we wouldn't need that because the
NestedChainMap
would just throw aKeyError
. Kinda like it currently does. Hmm, this again makes me wonder if we actually want this change, or if all errors from unresolved bang keys in ScopeSim are maybe really a symptom of something else being wrong. Yeah, I'll keep this a draft for now...