traits
traits copied to clipboard
Reading from an `Event` trait inside a `Tuple` trait should be an error
Reading the value of an Event()
trait should be an error, even when it's contained in another trait type. But we have the following behaviour in current Traits:
>>> from traits.api import HasTraits, Event, Tuple
>>>
>>> class A(HasTraits):
... foo = Tuple(Event(), Event())
...
>>> a = A()
>>> a.foo
(<undefined>, <undefined>)
Labelling as a bug, though it doesn't seem like a problem that's likely to turn up in real code. Not a high priority to fix for upcoming releases.
Whoops; I accidentally autoclosed this by merging #1546 (which said "This PR doesn't fix #1541"). Re-opening.