On Feb 16, 4:40 pm, Zack <[EMAIL PROTECTED]> wrote: > what method can you use on x to find all available > attributes for that class?
>>> class Foo(object): bar = "hello, world!" def __init__(self, baz): self.baz = baz >>> x = Foo(42) >>> x.__dict__.keys() # Does not include bar ['baz'] >>> dir(x) # Includes bar plus some methods ['__class__', '__delattr__', '__dict__', '__doc__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__weakref__', 'bar', 'baz'] -- http://mail.python.org/mailman/listinfo/python-list