Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.065 X-Spam-Evidence: '*H*': 0.87; '*S*': 0.00; 'rename': 0.07; 'iterate': 0.09; 'python': 0.11; 'suggest': 0.14; '23,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:???': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'error': 0.23; 'right.': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'message-id:@mail.gmail.com': 0.30; 'way?': 0.31; 'problem': 0.35; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'something': 0.35; 'received:google.com': 0.35; 'thanks': 0.36; 'possible': 0.36; 'should': 0.36; 'list.': 0.37; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'remove': 0.60; 'solve': 0.60; 'new': 0.61; 'further': 0.61; 'name': 0.63; 'such': 0.63; 'subject:..': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=opYi9KM996zXhPPfw9kUSaP2M44UdyGyFDX+PDXew1A=; b=mEygcoMvZCDKkVvyj3cJYNTRdttYK8h1HihDttH3Md7TUGXU8OQPe138wywy5Hh0lk 1pgHU9B1TeCsaLO7D2TAsnfFjT9D244Mba4zPm/+WkyP4G7UYhHVAUy3TgW6bSfvfQGT evRCA2QW8hhSu2vY0NcLt2qbMU1q6DsY10kGIjKfHgoyDIbEkpOxtZC9aQhEUYhK2DtF ZSUYPnoLZJgPN69qAqkygw3z7HlXUNNZseIl7x04SHVMLLlyNcJkMTAyCBtKjpqco0Af fjtcGXZq4/IIW12nXmltXTnsyR+kiQtM1VnjCukatqYjH43cod/3nSNT4+MMLMFX/XKv p/nw== MIME-Version: 1.0 X-Received: by 10.220.111.133 with SMTP id s5mr4740530vcp.63.1369304847553; Thu, 23 May 2013 03:27:27 -0700 (PDT) In-Reply-To: <110b4762-392d-4430-b1aa-6e8168ced9f3@googlegroups.com> References: <913d7fc1-4608-4ff5-8b51-2ae2cd67781a@googlegroups.com> <110b4762-392d-4430-b1aa-6e8168ced9f3@googlegroups.com> Date: Thu, 23 May 2013 20:27:27 +1000 Subject: Re: Scope of a class..help??? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369304850 news.xs4all.nl 15883 [2001:888:2000:d::a6]:49890 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45794 On Thu, May 23, 2013 at 8:23 PM, wrote: > Thanks Chris Angelico, > i am new to python can you suggest me how to remove the error and solve it. > so,how can i create an instance for "Node" in that function??,is, it not possible to create an instance in such a way? The problem isn't the instantiation; the problem's further down, where you reuse the name "Node" to iterate over your list. Rename that to something else and you should be right. ChrisA