1
0
forked from VimPlug/jedi

memoize_default should always take a first argument

This commit is contained in:
Dave Halter
2013-12-24 18:06:15 +01:00
parent 56457a9c8c
commit 066056fb2b
3 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -81,7 +81,7 @@ def clear_caches(delete_all=False):
del tc[key]
def memoize_default(default=None, cache=memoize_caches):
def memoize_default(default, cache=memoize_caches):
""" This is a typical memoization decorator, BUT there is one difference:
To prevent recursion it sets defaults.
@@ -111,7 +111,7 @@ class CachedMetaClass(type):
caches class initializations. I haven't found any other way, so I do it
with meta classes.
"""
@memoize_default()
@memoize_default(None)
def __call__(self, *args, **kwargs):
return super(CachedMetaClass, self).__call__(*args, **kwargs)