You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was certainly already suggested and discussed multiple times (e.g. #740 (comment) from @jlstevens) but I couldn't find a specific issue for it. name is a String Parameter included by default in every Parameterized object. At the class level it's set to the class name so P.name == P.__name__ and at the instance level it's set to the class name plus a global Parameterized instances count of 5 digits (e.g. P().name == "P00143").
The existence of name probably always comes as a surprise to Param users, I'm sure it had some very good reasons to exist when Param was created, however it seems to me this is no longer the case.
I'm sure .name is relied upon in many places in the HoloViz source codes (I definitively have code that uses P.name instead of P.__name__), removing it would certainly need to wait for Param 3.0. Until then, let's discuss how much we want to see it go away and if we do how it could be deprecated.
The text was updated successfully, but these errors were encountered:
I think it's more urgent to make .name behave normally than to remove it. Right now it behaves weirdly (#644), but I think we should be able to make it so that if someone overrides it with their own parameter it works as normal. Now that sentinel support is implemented I don't think it should even be difficult. Param itself shouldn't care about name per se, and then anything that builds on it and depends on the current behavior should work, but if people want name to be just a normal Parameter that should also work.
We could also separately support declaring that there shouldn't be a name parameter created at all, configurable at runtime, but that's more likely to have implications. We'd probably want to have .name still supply something in that case even if there is no name parameter that shows up in listings. Could be tricky, but probably better than fixing every instance of .name in all codebases.
This was certainly already suggested and discussed multiple times (e.g. #740 (comment) from @jlstevens) but I couldn't find a specific issue for it.
name
is aString
Parameter included by default in every Parameterized object. At the class level it's set to the class name soP.name == P.__name__
and at the instance level it's set to the class name plus a global Parameterized instances count of 5 digits (e.g.P().name == "P00143"
).The existence of
name
probably always comes as a surprise to Param users, I'm sure it had some very good reasons to exist when Param was created, however it seems to me this is no longer the case.I'm sure
.name
is relied upon in many places in the HoloViz source codes (I definitively have code that usesP.name
instead ofP.__name__
), removing it would certainly need to wait for Param 3.0. Until then, let's discuss how much we want to see it go away and if we do how it could be deprecated.The text was updated successfully, but these errors were encountered: