CodernityDB 2to3

This commit is contained in:
Ruud
2014-10-06 17:26:14 +02:00
parent 08cb834b4d
commit 4775e4a36a
9 changed files with 35 additions and 35 deletions
+3 -3
View File
@@ -32,8 +32,8 @@ except ImportError:
def twolvl_iterator(dict):
for k, v in dict.items():
for kk, vv in v.items():
for k, v in list(dict.items()):
for kk, vv in list(v.items()):
yield k, kk, vv
@@ -55,7 +55,7 @@ def create_cache1lvl(lock_obj):
with lock:
if len(cache) == maxsize:
for k, _ in nsmallest(maxsize // 10 or 1,
iter(use_count.items()),
iter(list(use_count.items())),
key=itemgetter(1)):
del cache[k], use_count[k]
cache[key] = user_function(key, *args, **kwargs)