Re: Caching function results

2016-03-03 Thread Peter Otten
Pavel Volkov wrote: > Suppose, I have some resource-intensive tasks implemented as functions in > Python. > Those are called repeatedly in my program. > It's guranteed that a call with the same arguments always produces the > same return value. > I want to cache the arguments and return values

Re: Caching function results

2016-03-03 Thread Ian Kelly
On Thu, Mar 3, 2016 at 1:28 PM, Pavel Volkov wrote: > Suppose, I have some resource-intensive tasks implemented as functions in > Python. > Those are called repeatedly in my program. > It's guranteed that a call with the same arguments always produces the same > return

Re: Caching function results

2016-03-03 Thread Martin A. Brown
Greetings Pavel, > Suppose, I have some resource-intensive tasks implemented as > functions in Python. Those are called repeatedly in my program. > It's guranteed that a call with the same arguments always produces > the same return value. I want to cache the arguments and return > values

Caching function results

2016-03-03 Thread Pavel Volkov
Suppose, I have some resource-intensive tasks implemented as functions in Python. Those are called repeatedly in my program. It's guranteed that a call with the same arguments always produces the same return value. I want to cache the arguments and return values and in case of repititive call