Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #7259

Re: Of Functions, Objects, and Methods-I NEED HELP PLEASE

From John Gordon <gordon@panix.com>
Newsgroups comp.lang.python
Subject Re: Of Functions, Objects, and Methods-I NEED HELP PLEASE
Date 2011-06-08 20:42 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <isomrg$b3g$1@reader1.panix.com> (permalink)
References <mailman.30.1307563778.11593.python-list@python.org>

Show all headers | View raw


In <mailman.30.1307563778.11593.python-list@python.org> Cathy James <nambo4jb@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@panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Of Functions, Objects, and Methods-I NEED HELP PLEASE Cathy James <nambo4jb@gmail.com> - 2011-06-08 15:09 -0500
  Re: Of Functions, Objects, and Methods-I NEED HELP PLEASE John Gordon <gordon@panix.com> - 2011-06-08 20:42 +0000
  Re: Of Functions, Objects, and Methods-I NEED HELP PLEASE Larry Hudson <orgnut@yahoo.com> - 2011-06-08 23:59 -0700
    Re: Of Functions, Objects, and Methods-I NEED HELP PLEASE Ethan Furman <ethan@stoneleaf.us> - 2011-06-09 05:54 -0700
    Re: Of Functions, Objects, and Methods-I NEED HELP PLEASE Ethan Furman <ethan@stoneleaf.us> - 2011-06-09 06:10 -0700
    Re: Of Functions, Objects, and Methods-I NEED HELP PLEASE Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2011-06-09 10:25 -0700
    Re: Of Functions, Objects, and Methods-I NEED HELP PLEASE Larry Hudson <orgnut@yahoo.com> - 2011-06-09 23:07 -0700

csiph-web