Re: [Python-Dev] proposed attribute lookup optimization

2007-07-11 Thread Paul Pogonyshev
[I don't know why I didn't receive this mail, presumably spam filter at gmx.net sucks as always] Phillip J. Eby wrote: > At 08:23 PM 7/8/2007 +0300, Paul Pogonyshev wrote: > >I would like to propose an optimization (I think so, anyway) for the > >way attributes are looked up. [...] > > [...] > >

Re: [Python-Dev] proposed attribute lookup optimization

2007-07-08 Thread Phillip J. Eby
At 08:23 PM 7/8/2007 +0300, Paul Pogonyshev wrote: >I would like to propose an optimization (I think so, anyway) for the >way attributes are looked up. Currently, it is done like this: > > return value of attribute in instance.__dict__ if present > for type in instance.__class__.__

[Python-Dev] proposed attribute lookup optimization

2007-07-08 Thread Paul Pogonyshev
Hi, I would like to propose an optimization (I think so, anyway) for the way attributes are looked up. Currently, it is done like this: return value of attribute in instance.__dict__ if present for type in instance.__class__.__mro__: return value of attribute in type.