Skip to content
Snippets Groups Projects
Commit 447ca17f authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Bugfix in new memoize function - cache needs to be in real decorator

function.
parent 218ad4c5
No related branches found
No related tags found
No related merge requests found
...@@ -40,10 +40,11 @@ def memoize(args=None, kwargs=None): ...@@ -40,10 +40,11 @@ def memoize(args=None, kwargs=None):
:arg args: A list of positional argument indices. :arg args: A list of positional argument indices.
:arg kwargs: A list of keyword argument names. :arg kwargs: A list of keyword argument names.
""" """
cache = {}
def decorator(func): def decorator(func):
cache = {}
def wrapper(*a, **kwa): def wrapper(*a, **kwa):
key = [] key = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment