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
On Fri, Oct 5, 2012 at 11:39 AM, 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:
Am 05.10.2012 19:39, schrieb Ethan Furman:
> I'm thinking step 1 is flat-out wrong and doesn't exist. Does anybody
> know otherwise?
The answer is confusing and also wrong. For instance it ignores the
existence of __slots__, metaclasses and the different lookup strategy of
__special__ methods in
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) Pyth
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
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) attr