Materialize default values based on all the parameters available #798
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.
Fixes #760
#760 identified that this regression happened in #424. More precisely I've found out it was due to this change https://github.com/holoviz/param/pull/424/files#diff-c8fc4fb68012b66fbf42ad9e0b4714fd96a3a72b83558bc543130d78bd622eb3R1275-R1279 by which Param would "instantiate" (i.e. materialize a default Parameter value into an instance) the wrong Parameter default. That happened if a Parameter is inherited and isn't re-declared by the subclass, in which case the "instantiated" value would be the one from the first class above in the hierarchy that declares the Parameter.
Instead of the custom class hierarchy traversal I've opted for leveraging
.param.objects(instance=False)
.