Show More
@@ -51,15 +51,6 b' def dir2(obj):' | |||
|
51 | 51 | # TypeError: dir(obj) does not return a list |
|
52 | 52 | words = set() |
|
53 | 53 | |
|
54 | # for objects with Enthought's traits, add trait_names() list | |
|
55 | try: | |
|
56 | func = getattr(obj, 'trait_names') | |
|
57 | if callable(func): | |
|
58 | words |= set(func()) | |
|
59 | except: | |
|
60 | # TypeError: obj is class not instance | |
|
61 | pass | |
|
62 | ||
|
63 | 54 | # filter out non-string attributes which may be stuffed by dir() calls |
|
64 | 55 | # and poor coding in third-party modules |
|
65 | 56 |
General Comments 0
You need to be logged in to leave comments.
Login now