Of Functions, Objects, and Methods-I NEED HELP PLEASE
John Gordon
gordon at panix.com
Wed Jun 8 16:42:24 EDT 2011
In <mailman.30.1307563778.11593.python-list at python.org> Cathy James <nambo4jb at gmail.com> writes:
> b) I would like to append to my list, but my line dogs.dogAppend() is
> giving a TypeError:
> for i in enumerate (self.dogAppend()):
> TypeError: 'list' object is not callable
> def dogAppend(self):
> self.dogAppend = []
You have a method and a list that are both called dogAppend. Try naming
one of them something different.
--
John Gordon A is for Amy, who fell down the stairs
gordon at panix.com B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"
More information about the Python-list
mailing list