holoviz / holoviews

With Holoviews, your data visualizes itself.
https://holoviews.org
BSD 3-Clause "New" or "Revised" License
2.7k stars 402 forks source link

Remove sole usage of .param.defaults #5101

Open jbednar opened 3 years ago

jbednar commented 3 years ago

We're trying to trim unneeded methods from Param Parameterized objects, and the only usage I could find for .param.defaults was in HoloViews:

lod = dict(self.param.defaults().get('lod', {}), **self.lod) https://github.com/holoviz/holoviews/blob/master/holoviews/plotting/bokeh/element.py#L558

That one usage doesn't seem like a strong enough reason to keep a method around on every Parameterized object. .param.defaults has some complicated semantics for what happens when objects don't yet exist, which differs based on the value of instantiate, so I'm not sure precisely what to replace it with, or even whether that existing semantics is in fact appropriate in this case. Can we replace this code with something clearer, e.g. accessing self.param.lod directly?

jlstevens commented 2 years ago

I think this should be a trivial PR that I'll attempt shortly.