Validate default value upon trait instantiation?
Open
type: discussion
- Dominant language
- Python
- Stars
- 462
- Forks
- 90
- PR merge metrics
- No merged PRs in 30d
Description
This came up a few times in the past (e.g. #886): Currently default value is not validated upon trait initialization, so one could do this
```
from traits.api import Int, HasTraits
class Foo(HasTraits):
age = Int("ABC")
>>> f = Foo()
>>> f.age
"ABC"
```
This issue is for discussing whether or not we should validate default values for all the traits when the trait is instantiated (and inevitably the "how" if we do).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.