objects container shared when check_on_set is False
Should the objects container of a Selector be shared when check_on_set is False?
import param
class P(param.Parameterized):
s = param.Selector(default=1, objects=[1, 2], check_on_set=False)
pa = P(s=3)
pb = P(s=4)
p = P()
print(p.param.s.objects)
# [1, 2, 3, 4]
I think that behavior might surprise people, but (a) it seems semantically valid since check_on_set=False means that new values will always be accepted anyway (ensuring that objects has no role in validation, unlike for check_on_set=True), and (b) it might be useful in a GUI context so that people can select other values previously used for this parameter in other widgets. E.g. if this were used for collecting addresses for a bunch of people, and s were city, then once you'd filled out the city for one person, that city would show up in the dropdown for all other people you're filling out so that you only have to type it once. objects can then be interpreted as "all values for this parameter seen so far". So it seems ok to me, but there are probably counterexamples where this behavior would be undesirable.