Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!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.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'subject:method': 0.09; 'pm,': 0.10; 'wrote:': 0.14; 'attributes.': 0.16; 'cc:addr:python- list': 0.17; 'header:In-Reply-To:1': 0.21; 'cc:2**0': 0.22; 'cc:no real name:2**0': 0.23; 'fri,': 0.23; 'received:209.85.161.46': 0.23; 'received:mail-fx0-f46.google.com': 0.23; 'function': 0.25; 'received:209.85.161': 0.26; 'message-id:@mail.gmail.com': 0.28; 'cc:addr:python.org': 0.30; '8bit%:3': 0.35; 'joe': 0.36; 'received:google.com': 0.37; 'received:209.85': 0.37; 'subject:: ': 0.38; 'received:209': 0.39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=wjy+RSvhHOhVqANPU6rz30WgsvXaEi965e1vdIvG64k=; b=Qg3np8ANX2PBktldCCWF9HctIIVBSbYFl2FTXC/gRKVprvNm8vQ7klcb/HPuCwUOU4 2eZVDV2UienxFX0omjD4gzYvl96tULAV8IPilZSPetEQ80cL8V5K18y+WuNqzQAJe6Fp TvWBmh1tPQgq2NmPhM1Jy2b3ATTMcTMGzaamM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=ZMZaSfY3Kvjk+M9g96DZxhMq5ngAbAOPON4FO2vQyhIZcff8VpACrgAThWpiYndCv/ Vvs6370jm7KphKsv/MVf5x0vt1dmjgvtKFbA5q0iV4KajwJ5nQ3qBAUDETi9I9/44U9s NRthe3ht59bdQSF/mTwUwr+MVZFDdfpNKzNT0= MIME-Version: 1.0 In-Reply-To: <6708872e-bf6e-4f7c-b9ec-d00a71cddc4f@j23g2000yqc.googlegroups.com> References: <6708872e-bf6e-4f7c-b9ec-d00a71cddc4f@j23g2000yqc.googlegroups.com> From: Ian Kelly Date: Sat, 4 Jun 2011 14:02:27 -0600 Subject: Re: Determine attributes of calling method To: Joe Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 7 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1307217779 news.xs4all.nl 49183 [::ffff:82.94.164.166]:37226 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:7021 On Fri, Jun 3, 2011 at 2:35 PM, Joe wrote: > =A0 =A0foo.__dict__['color']=3D'blue' > =A0 =A0fu.__dict__['color']=3D'red' You don't need to use __dict__ to set function attributes. Just do: foo.color =3D 'blue'