Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > RE: How to memoize functions?

Reply
Thread Tools

RE: How to memoize functions?

 
 
sismex01@hebmex.com
Guest
Posts: n/a
 
      06-27-2003
> From: Chris Reedy [(E-Mail Removed)]
> Sent: Viernes, 27 de Junio de 2003 09:19 a.m.
>
> That's true. Unfortunately, that misses the other half of the
> problem (which, admittedly, I didn't mention) which is that I
> would also like to be able to collect the results of the function,
> which could be complex data structures, as well as the arguments
> (which could be other instances of the same complex structures).
>
> Chris
>


So how do you wish to memoize, if you wish for the
results (which are gonna get cached) to be collected?

Is this a long running process? If it's not, then
I'd say to cache the results which take more than X
seconds to calculate and forget about having the
results collected.

Or, use a shelf instead of a dictionary.

-gustavo

Advertencia:La informacion contenida en este mensaje es confidencial y
restringida, por lo tanto esta destinada unicamente para el uso de la
persona arriba indicada, se le notifica que esta prohibida la difusion de
este mensaje. Si ha recibido este mensaje por error, o si hay problemas en
la transmision, favor de comunicarse con el remitente. Gracias.

 
Reply With Quote
 
 
 
 
Roy Smith
Guest
Posts: n/a
 
      06-27-2003
In article <(E-Mail Removed)>,
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> Or, use a shelf instead of a dictionary.


What's a shelf?
 
Reply With Quote
 
 
 
 
Aahz
Guest
Posts: n/a
 
      06-27-2003
In article <(E-Mail Removed)>,
Roy Smith <(E-Mail Removed)> wrote:
>In article <(E-Mail Removed)>,
> (E-Mail Removed) wrote:
>>
>> Or, use a shelf instead of a dictionary.

>
>What's a shelf?


It's a layer on top of a Berkeley database. See the shelve module docs.
--
Aahz ((E-Mail Removed)) <*> http://www.pythoncraft.com/

Usenet is not a democracy. It is a weird cross between an anarchy and a
dictatorship.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
efficient memoize decorator? thattommyhallll@gmail.com Python 11 08-19-2006 12:27 PM
AssertionError in pickle's memoize function Michael Hohn Python 3 10-31-2004 03:13 PM
How to memoize functions? Chris Reedy Python 3 06-27-2003 02:18 PM
RE: How to memoize functions? sismex01@hebmex.com Python 0 06-26-2003 08:45 PM



Advertisments