Velocity Reviews - Computer Hardware Reviews

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

Thread Tools

RE: How to memoize functions?
Posts: n/a
> 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.


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
Posts: n/a
In article <(E-Mail Removed)>, Removed) wrote:

> Or, use a shelf instead of a dictionary.

What's a shelf?
Reply With Quote
Posts: n/a
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)) <*>

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

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? 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? Python 0 06-26-2003 08:45 PM