memorization function decorator
From ActiveState Recipes. “Probably
the fastest memoization decorator in the world”
Python code:
#coding:utf-8
from time import time
def memofunc(f):
""" Memoization decorator for a func
原创
2012-08-16 20:23:06 ·
431 阅读 ·
0 评论