##// END OF EJS Templates
Don't handle traits specially in dir2...
Thomas Kluyver -
Show More
@@ -51,15 +51,6 b' def dir2(obj):'
51 # TypeError: dir(obj) does not return a list
51 # TypeError: dir(obj) does not return a list
52 words = set()
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 # filter out non-string attributes which may be stuffed by dir() calls
54 # filter out non-string attributes which may be stuffed by dir() calls
64 # and poor coding in third-party modules
55 # and poor coding in third-party modules
65
56
General Comments 0
You need to be logged in to leave comments. Login now