Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news-out.readnews.com!transit3.readnews.com!panix!gordon From: John Gordon Newsgroups: comp.lang.python Subject: Re: Of Functions, Objects, and Methods-I NEED HELP PLEASE Date: Wed, 8 Jun 2011 20:42:24 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 19 Message-ID: References: NNTP-Posting-Host: panix2.panix.com X-Trace: reader1.panix.com 1307565744 11376 166.84.1.2 (8 Jun 2011 20:42:24 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Wed, 8 Jun 2011 20:42:24 +0000 (UTC) User-Agent: nn/6.7.3 Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:7259 In Cathy James 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@panix.com B is for Basil, assaulted by bears -- Edward Gorey, "The Gashlycrumb Tinies"