-
-
Notifications
You must be signed in to change notification settings - Fork 79
Closed
Labels
type-bugBug reportBug report
Milestone
Description
Carrying this over from #404.
Should we validate the provided default? Currently, param is e.g. ok with param.Number(default=None, bounds=(1, 100)) but will throw an error at param.DataFrame(default=None, rows=(1, 10)).
Param usually sets
allow_None=Trueif the default is set to None, under the assumption that the Parameterized class author clearly thus intends None to be valid for this Parameter. If param.DataFrame does not do that, I would be happy for such code to be added to param.DataFrame (and to these new classes) to do that; it seems like a reasonable thing to do for the convenience of authors.
It seems like DataFrame sets the allow_None flag accordingly but does not take it into account in _validate.
Metadata
Metadata
Assignees
Labels
type-bugBug reportBug report