MenTaLguY wrote:

> That doesn't mean it's unusable, however.  If 90% of your program's time
> is doing something other than calling methods on these proxied objects
> directly the extra overhead really might not matter.
>
> This might be because, for example:
>
>  - you're calling an iterator method on the proxied object; you only pay
> for the initial call, not each iteration
>
>  - you're getting a reference to another object from an accessor on the
> proxied object, and mostly work with that other object instead; so you
> only pay the penalty once to get the reference to that other object
>
>  - the promised computation is extremely time-consuming
>
> Lazy evaluation can also open the door to efficient algorithms which
> would otherwise be prohibitively difficult to code.

Fair enough. Still, a more efficient core lazy-evaluation feature would
nice.

Sorry I didn't respond directly to your last post. I was hoping to try
the code out first, but my system is screwed up at them moment. Your
example is interesting. I hadn't notice __getobj__ before. Also, I
don't think caching is always desired. Better if it is setable, like
using memoize on a method.

T.