`Union` doesn't handle mapped traits
- Dominant language
- Python
- Stars
- 462
- Forks
- 90
- PR merge metrics
- No merged PRs in 30d
Description
An issue we are currently seeing trying to remove `Trait(...)` and `Either(...)` from Chaco: when you have `Union(..., FooTrait, ...)` where `FooTrait` is a mapped trait, union does not carry over the mapping behaviour, where `Trait(...)` did (I have not checked exactly what it does). There may be a similar issue with `post_setattr`?
I'm not sure what the right fix is in this case: you could say that a `Union` with any mapped trait is a mapped trait, but what do you set into the trait for un-mapped values: the safest is _probably_ just to pass the value through, but arguments could be made for `None` or `Undefined` or similar.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.