enthought / enthought/traits

Traits incorrectly added by `depends_on` with Property

Open
#447 4 comments 0 reactions 0 assignees View on GitHub
topic: traits listener rework type: bug
Dominant language
Python
Stars
462
Forks
90
PR merge metrics
No merged PRs in 30d

Description

Here's code that shows the behavior:

```
import traits.api as tr
class X(tr.HasStrictTraits):
pass
class Y(tr.HasStrictTraits):
x = tr.Instance(X)
z = tr.Property(tr.Int, depends_on="x.jjj")
x = X()
print('jjj' in dir(x)) # False
y = Y(x=x)
print('jjj' in dir(x)) # True

print(x.trait_names()) # ['trait_added', 'trait_modified', 'jjj']

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.