enthought / enthought/qt_binder
Robust handling of non-HasTraits in attribute chain
- Dominant language
- Python
- Stars
- 20
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
We currently detect all attribute chains in `PulledFrom` expressions (i.e. `object.foo.bar.baz`). If we want to call a method on a non-HasTraits object on something that is traited (e.g. `object.string_template.format(...)`), we will incorrectly try to attach a listener to `object.string_template` and cause an exception. This exception cannot be ignored because the listener will continue to try to attach itself every time a new value is assigned to that last trait. We may need to use a customized `ListenerNotifyWrapper` to be robust. Alternately, we can try just checking each object down the chain and stopping when we get to a non-`HasTraits` object. The chain should be fully realized (i.e. no `None`s for `Instance` traits) anyways.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.