##// END OF EJS Templates
util: rename a variable to avoid confusing pytype...
Matt Harbison -
r44332:eff050db default
parent child Browse files
Show More
@@ -1195,12 +1195,12 b' def cachefunc(func):'
1195 '''cache the result of function calls'''
1195 '''cache the result of function calls'''
1196 # XXX doesn't handle keywords args
1196 # XXX doesn't handle keywords args
1197 if func.__code__.co_argcount == 0:
1197 if func.__code__.co_argcount == 0:
1198 cache = []
1198 listcache = []
1199
1199
1200 def f():
1200 def f():
1201 if len(cache) == 0:
1201 if len(listcache) == 0:
1202 cache.append(func())
1202 listcache.append(func())
1203 return cache[0]
1203 return listcache[0]
1204
1204
1205 return f
1205 return f
1206 cache = {}
1206 cache = {}
General Comments 0
You need to be logged in to leave comments. Login now