# HG changeset patch # User James Bergstra # Date 1284518294 14400 # Node ID c9ec065ff73663ba28b67fff5968d01a5027a7ce # Parent bef6c5f565cd9a74ac831acdb52f1b16cd8e7330 cleanup in memo.py diff -r bef6c5f565cd -r c9ec065ff736 pylearn/dataset_ops/memo.py --- a/pylearn/dataset_ops/memo.py Tue Sep 14 22:37:00 2010 -0400 +++ b/pylearn/dataset_ops/memo.py Tue Sep 14 22:38:14 2010 -0400 @@ -9,9 +9,6 @@ def memo(f): #TODO: support kwargs to rval. This requires looking up the names of f's parameters to # construct a proper key. - - #TODO: use weak references instead of a normal dict so that the cache doesn't prevent - # garbage collection cache = {} def rval(*args): if args not in cache: @@ -24,5 +21,6 @@ rval.forget = forget rval.__name__ = 'memo@%s'%f.__name__ rval.cache = cache + rval.__doc__ = f.__doc__ return rval