added a log for proof of cache
This commit is contained in:
parent
2e7391f573
commit
09fc14b99d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user