Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'python': 0.09; 'received :mail-vb0-f46.google.com': 0.09; 'cc:addr:python-list': 0.10; 'def': 0.10; 'a():': 0.16; 'subject:which': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'received:209.85.212.46': 0.18; 'defined': 0.22; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'received:209.85.212': 0.28; 'skip:_ 10': 0.29; 'class': 0.29; 'could': 0.32; 'print': 0.32; 'skip:d 20': 0.34; 'received:google.com': 0.34; 'subject:?': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'header:Received:5': 0.40; 'within': 0.64 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 :cc:content-type; bh=9ItjbYILGEeYyXACxjQAqtfO2H/IVxgOs0kCrTTx6+E=; b=mU7Izz2JMyZbTLLyghXkSrnTs27YNc73ZAo4RQ4ZJSMkzvUaeZHoD7LqxORPBRhfy5 zkCEm6FehGeWAfixuYHA7Zr+AT64WcDfyBWdP7Su4aCpz3QADOrz7/7IQRgGy77ilf5O D4YOQDBdPDwSf+B7b9SqXgCb0lCEfCYHyCVbzHnaDYS8VSCjej8vPpxSzBH4FvOCoLM2 8Bj9q+4gAk8HGaZe+Gox8QKjk2JVvhG6VCUD07mMdeHZR/6kX6S1UMS0ymeYBQsCIjdp 2E1LyhEryVW7muoo0g3k/gQvi6P3ydj8GEcTVh1rUJimsNll4MajZMRB38wUdMp/ctoY Xwpw== MIME-Version: 1.0 In-Reply-To: References: <95e88ca6-36ad-4820-8ecc-c9a788517430@googlegroups.com> <50610671$0$29981$c3e8da3$5496439d@news.astraweb.com> Date: Mon, 24 Sep 2012 21:50:56 -0400 Subject: Re: which a is used? From: Dwight Hutto To: "Steven D'Aprano" Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org 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: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1348537858 news.xs4all.nl 6908 [2001:888:2000:d::a6]:33268 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:29993 But within a class this is could be defined as self.x within the functions and changed, correct? class a(): def __init__(self,a): self.a = a def f(self): print self.a def g(self): self.a = 20 print self.a a = a(1) a.f() a.g() Yielding: david@david-desktop:~$ python answer_to_email.py 1 20 david@david-desktop:~$ -- Best Regards, David Hutto CEO: http://www.hitwebdevelopment.com