[Tutor] dir() question: how do you know which are attributes and which are methods?

R. Alan Monroe R. Alan Monroe" <amonroe@columbus.rr.com
Sun May 25 20:27:01 2003


Subject says it all...

example


class dummy:
        stuff = 0
        def task():
                pass

>>> dir(dummy)
['__doc__', '__module__', 'stuff', 'task']

How do I find out, when working with a new class I'm not familiar
with, how many attributes it has, and how many methods? dir() is a bit
too generic because both look identical in the list...

Alan