From 09fc14b99daf7ddb386dda36372d7c20caec34d4 Mon Sep 17 00:00:00 2001 From: Stephen Mardson McQuay Date: Wed, 4 May 2011 21:25:16 -0600 Subject: [PATCH] added a log for proof of cache --- interp/baker/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/interp/baker/__init__.py b/interp/baker/__init__.py index b60139f..8010141 100644 --- a/interp/baker/__init__.py +++ b/interp/baker/__init__.py @@ -197,6 +197,7 @@ def memoize(f): @wraps(f) def memf(*x, **kargs): if x not in cache: + log.debug("adding to cache: %s", x) cache[x] = f(*x, **kargs) return cache[x] return memf @@ -208,7 +209,9 @@ def combinations_with_replacement(iterable, r): the implementation in this function as a replacement. - see: http://docs.python.org/library/itertools.html#itertools.combinations_with_replacement + source: + + http://docs.python.org/library/itertools.html#itertools.combinations_with_replacement """ pool = tuple(iterable) n = len(pool)