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


Groups > comp.lang.python > #30848

Re: instance.attribute lookup

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ethan@stoneleaf.us>
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; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'received:184.172': 0.09; 'received:gator410.hostgator.com': 0.09; '~ethan~': 0.09; '(besides': 0.16; 'attribute,': 0.16; 'attributes:': 0.16; 'attrname': 0.16; 'esp,': 0.16; 'means.': 0.16; 'oct': 0.16; 'received:72.11': 0.16; 'received:72.11.125': 0.16; 'received:72.11.125.166': 0.16; 'retrieving': 0.16; 'wrote:': 0.17; 'subject:skip:i 10': 0.22; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; '[1]': 0.27; 'question': 0.27; '[2]': 0.27; "doesn't": 0.28; '-0700,': 0.29; "d'aprano": 0.29; 'steps:': 0.29; 'steven': 0.29; 'points': 0.29; "i'm": 0.29; 'fri,': 0.30; 'anybody': 0.32; 'to:addr:python-list': 0.33; 'wrong': 0.34; 'sequence': 0.35; 'something': 0.35; 'there': 0.35; '(i.e.': 0.36; 'does': 0.37; 'subject:: ': 0.38; 'object': 0.38; 'skip:o 20': 0.38; 'to:addr:python.org': 0.39; 'step': 0.39; 'header:Received:5': 0.40; 'skip:u 10': 0.60; 'different': 0.63; 'received:69.56': 0.65; 'special': 0.73; '(print': 0.84; 'ball,': 0.84; 'furman': 0.84; 'glad': 0.86; 'ethan': 0.91
Date Fri, 05 Oct 2012 16:12:22 -0700
From Ethan Furman <ethan@stoneleaf.us>
User-Agent Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version 1.0
To python-list@python.org
Subject Re: instance.attribute lookup
References <mailman.1861.1349459170.27098.python-list@python.org> <506f668d$0$29978$c3e8da3$5496439d@news.astraweb.com>
In-Reply-To <506f668d$0$29978$c3e8da3$5496439d@news.astraweb.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-AntiAbuse This header was added to track abuse, please include it with any abuse report
X-AntiAbuse Primary Hostname - gator410.hostgator.com
X-AntiAbuse Original Domain - python.org
X-AntiAbuse Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse Sender Address Domain - stoneleaf.us
X-BWhitelist no
X-Source
X-Source-Args
X-Source-Dir
X-Source-Sender ([192.168.10.136]) [72.11.125.166]:4518
X-Source-Auth ethan+stoneleaf.us
X-Email-Count 1
X-Source-Cap dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ==
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1878.1349479270.27098.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1349479270 news.xs4all.nl 6916 [2001:888:2000:d::a6]:49761
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:30848

Show key headers only | View raw


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~

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


Thread

instance.attribute lookup Ethan Furman <ethan@stoneleaf.us> - 2012-10-05 10:39 -0700
  Re: instance.attribute lookup Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-10-05 23:00 +0000
    Re: instance.attribute lookup Ethan Furman <ethan@stoneleaf.us> - 2012-10-05 16:12 -0700
    Re: instance.attribute lookup Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-10-06 00:32 +0100

csiph-web