A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2005-September/056422.html below:

[Python-Dev] Skiping searching throw dictionaries of mro() members.

[Python-Dev] Skiping searching throw dictionaries of mro() members.Sokolov Yura falcon at intercable.ru
Wed Sep 14 20:11:03 CEST 2005
Phillip J. Eby wrote:

> At 09:12 PM 9/14/2005 +0400, Sokolov Yura wrote:
>
>> We could cash looks by this way:
>> Store with a class its version. Every time after creation when we change
>> a class
>> (add,remove or chage class member, including __base__, __bases__ and 
>> mro) ,
>> we increase the version number. Lets call it VERSION
>
>
> FYI, there is already a mechanism for new-style classes that notifies 
> subclasses of changes to the base class; this mechanism could be used 
> to push cache flushes downward, rather than doing version checking 
> upward.
>
>
>
I didn't know it. So, if this thing works, it should be used.

Another think. I do not really know, how emplemented scopes,
but could this caching be applied to a scope realisation?
So we "derive" current scope from his outer and cache all lookups, that 
goes out of this scope.
Top scope is "derived" from a module and module it self "derived" from 
builtins.
I think, there not many different deep upper lookups in current 
programs, but many reapeating,
 and not often we change outer scope, so cache will be fine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4