![]() |
|
|
+ Search |
![]()
|
Jul 5th, 2000 10:03
Nathan Wallace, Hans Nowak, Snippet 325, Donn Cave
"""
Packages: oop
"""
"""
| Is it possible to get the functions of an object using dir()? Rather
| that looking them up in a book/API.
Yes, though not directly through the object and it's not real simple.
"""
def printcdir(c):
print dir(c)
for b in c.__bases__:
printcdir(b)
def printxdir(instance):
print dir(instance)
printcdir(instance.__class__)