LeRoy Lee wrote: > class foo2: > def __init__(self): > self.j = 5 > >>> h = foo2() >>> h.j > > Traceback (most recent call last): > File "<stdin>", line 1, in ? > AttributeError: foo2 instance has no attribute 'j'
Try again: >>> class foo2: ... def __init__(self): ... self.j = 5 ... >>> h = foo2() >>> h.j 5 -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list