holoviz / param

Param: Make your Python code clearer and more reliable by declaring Parameters
https://param.holoviz.org
BSD 3-Clause "New" or "Revised" License
412 stars 69 forks source link

Setting a `Parameter` value in `__init__` before calling `super().__init__` #815

Open maximlt opened 11 months ago

maximlt commented 11 months ago

Working on the private namespace I have had to handle when a Parameter value is set in __init__ before calling super().__init__. This is to me an anti-pattern and I would be very happy not having to support that in Param. Also, it sort of works but isn't really fully tested so I wouldn't be surprised if it was also partially broken.

The only occurrence of this patter I found across the HoloViz packages was in HoloViews and it's been updated since then in https://github.com/holoviz/holoviews/pull/5814.

I'd be in favor of deprecating this usage.

jbednar commented 10 months ago

I agree with deprecating this usage; it is not something I would expect to be fully supported and it is difficult to imagine a valid need for it.