Potential patch for #3084

This commit is contained in:
Miroslav Stampar
2018-05-04 16:29:36 +02:00
parent 2a810fb796
commit 73d8952f2a
3 changed files with 4 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ def cachedmethod(f, cache={}):
"""
def _(*args, **kwargs):
key = int(hashlib.md5("".join(str(_) for _ in (f, args, kwargs))).hexdigest()[:8], 16)
key = int(hashlib.md5("|".join(str(_) for _ in (f, args, kwargs))).hexdigest(), 16) & 0x7fffffffffffffff
if key not in cache:
cache[key] = f(*args, **kwargs)