Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'attribute': 0.05; 'python': 0.09; 'exist.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'underscore': 0.09; '~ethan~': 0.09; '(besides': 0.16; 'attribute"': 0.16; 'attribute,': 0.16; 'attributes:': 0.16; 'attrname': 0.16; 'esp,': 0.16; 'means.': 0.16; 'oct': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'retrieving': 0.16; 'wrote:': 0.17; 'refers': 0.17; '>>>': 0.18; 'names.': 0.22; 'subject:skip:i 10': 0.22; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; '[1]': 0.27; 'guess': 0.27; 'question': 0.27; '[2]': 0.27; "doesn't": 0.28; 'header:X-Complaints-To:1': 0.28; '-0700,': 0.29; "d'aprano": 0.29; 'steps:': 0.29; 'steven': 0.29; 'points': 0.29; 'probably': 0.29; "i'm": 0.29; 'fri,': 0.30; 'anybody': 0.32; 'from:addr:yahoo.co.uk': 0.32; 'to:addr:python-list': 0.33; 'wrong': 0.34; 'sequence': 0.35; 'something': 0.35; 'there': 0.35; 'received:org': 0.36; '(i.e.': 0.36; 'does': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'object': 0.38; 'skip:o 20': 0.38; 'several': 0.39; 'to:addr:python.org': 0.39; 'step': 0.39; 'skip:" 10': 0.40; 'header:Received:5': 0.40; 'skip:u 10': 0.60; 'different': 0.63; 'special': 0.73; '(print': 0.84; 'ball,': 0.84; 'furman': 0.84; 'glad': 0.86; 'ethan': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: instance.attribute lookup Date: Sat, 06 Oct 2012 00:32:44 +0100 References: <506f668d$0$29978$c3e8da3$5496439d@news.astraweb.com> <506F6956.2070502@stoneleaf.us> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-78-147-20-160.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 In-Reply-To: <506F6956.2070502@stoneleaf.us> X-Antivirus: avast! (VPS 121005-1, 05/10/2012), Outbound message X-Antivirus-Status: Clean 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: 37 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1349479927 news.xs4all.nl 6881 [2001:888:2000:d::a6]:59071 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:30853 On 06/10/2012 00:12, Ethan Furman wrote: > Steven D'Aprano wrote: >> On Fri, 05 Oct 2012 10:39:53 -0700, Ethan Furman wrote: >> >>> There is a StackOverflow question [1] that points to this on-line book >>> [2] which has a five-step sequence for looking up attributes: >>> >>> > When retrieving an attribute from an object (print >>> > objectname.attrname) Python follows these steps: >>> > >>> > 1. If attrname is a special (i.e. Python-provided) attribute for >>> > objectname, return it. >> [...] >>> I'm thinking step 1 is flat-out wrong and doesn't exist. Does anybody >>> know otherwise? >> >> I'm thinking I don't even understand what step 1 means. >> >> What's a Python-provided attribute, and how is it different from other >> attributes? > > Well, if /you/ don't understand it I feel a lot better about not > understanding it either! :) > > Glad to know I'm not missing something (besides ESP, a crystal ball, and > a mind-reader!) > > ~Ethan~ My probably highly uneducated guess is that "Python-provided attribute" refers to double underscore names. YMMV by several trillion light years :) -- Cheers. Mark Lawrence.