David, 2011/6/22 David Merrick <merrick...@gmail.com>: > # listen to your critter > elif choice == "1": > for critter in farmlet: > farmlet.talk()
You want to call .talk() on your "critter" instance which has the .talk() method, not on farmlet (which is a list as the error message states) > Traceback (most recent call last): > File "I:/Python/programs/critter_farm4.py", line 117, in <module> > main() > File "I:/Python/programs/critter_farm4.py", line 103, in main > farmlet.talk() > AttributeError: 'list' object has no attribute 'talk' You will probably have a problem when calling talk() because it references to the "farmlet" variable which doesn't exist in the scope of your .talk() method. HTH, -- Alex | twitter.com/alexconrad _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor