Jeff Rollin <[EMAIL PROTECTED]> wrote: > I'm working with the Python Tutorial "Byte of Python" at swaroopch.info. > > I have created the attached file, but when I execute: > > % objvar.py > > I get the error message: > > (Initializing Calamity Jane) > Traceback (most recent call last): > File "/home/jef/bin/objvar.py", line 49, in <module> > Person.how_many() > AttributeError: class Person has no attribute 'how_many' > > Where am I going wrong?
The indentation of __del__, say_hi and how_many is wrong. You define them inside __init__. Move them to the same indentation level as __init__ and all should work. -- http://mail.python.org/mailman/listinfo/python-list