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


Groups > comp.lang.python > #30848

Re: instance.attribute lookup

Date 2012-10-05 16:12 -0700
From Ethan Furman <ethan@stoneleaf.us>
Subject Re: instance.attribute lookup
References <mailman.1861.1349459170.27098.python-list@python.org> <506f668d$0$29978$c3e8da3$5496439d@news.astraweb.com>
Newsgroups comp.lang.python
Message-ID <mailman.1878.1349479270.27098.python-list@python.org> (permalink)

Show all headers | 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