efficient memoize decorator?

Gabriel Genellina gagsl-py at yahoo.com.ar
Fri Aug 18 23:32:06 EDT 2006


At Friday 18/8/2006 17:14, thattommyhallll at gmail.com wrote:

>sorry
>memoize is
>http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496879

This implementation uses cPickle to generate a key from the supplied 
function arguments, which is very slow and defeats the purpose of memoizing.
In your example -function with no keyword arguments- use the much 
simpler implementation from 
<http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/325205> NOT 
the original recipe but the comment by Chris Spencer titled "A 
working example".



Gabriel Genellina
Softlab SRL 


	
	
		
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas




More information about the Python-list mailing list