提交 871f3879 authored 作者: Frederic's avatar Frederic

pep8 and python3 fix

上级 3e66f333
...@@ -51,8 +51,7 @@ def test_remove(): ...@@ -51,8 +51,7 @@ def test_remove():
def test_hash_from_dict(): def test_hash_from_dict():
dicts = [{}, {0: 0}, {0: 1}, {1: 0}, {1: 1}, dicts = [{}, {0: 0}, {0: 1}, {1: 0}, {1: 1},
{0: (0,)}, {0: [1]}, {0: (0,)}, {0: [1]},
{0: (0, 1)}, {0: [1, 0]}, {0: (0, 1)}, {0: [1, 0]}]
]
for elem in dicts[:]: for elem in dicts[:]:
dicts.append(OrderedDict(elem)) dicts.append(OrderedDict(elem))
hashs = [] hashs = []
......
...@@ -483,7 +483,7 @@ def hash_from_dict(d): ...@@ -483,7 +483,7 @@ def hash_from_dict(d):
""" """
if isinstance(d, OrderedDict): if isinstance(d, OrderedDict):
items = list(d.iteritems()) items = list(iteritems(d))
else: else:
items = list(d.items()) items = list(d.items())
items.sort() items.sort()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论