gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] proposal for dbapi base class


From: Horst Herb
Subject: Re: [Gnumed-devel] proposal for dbapi base class
Date: Tue, 21 Jan 2003 01:18:42 +1100
User-agent: KMail/1.4.3

On Tue, 21 Jan 2003 00:59, Horst Herb wrote:
>        class lazytable:
>                 def __getattr__(self, key):
>                         try:
>                                 return self.__dict__[key]
>                         except:
>                                 value = fetch_from_backend(key)
>                                 self.__dict__[key]= value
>                                 return value

Just to emphasize: fetch_from_backend would of course be smart enough to fetch 
as much data as possible without unreasonable performance penalty in the 
spirit of read-ahead caching. Not just fetch a single atribute per backend 
access

Horst




reply via email to

[Prev in Thread] Current Thread [Next in Thread]