提交 f3d1be45 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Removed assert that fails under Linux - Still need to figure out why

上级 caa8e40d
...@@ -48,9 +48,13 @@ class DeepCopiableFunction(Singleton): ...@@ -48,9 +48,13 @@ class DeepCopiableFunction(Singleton):
def __eq__(self, other): def __eq__(self, other):
if type(self) != type(other): if type(self) != type(other):
return False return False
# Since it is a singleton there should be no two different instance # Since it is a singleton there should be no two different instances
# of this class. # of this class. However it looks like this can actually happen under
assert self is other # Linux when pickling with protocol 0 => need to look into this. Until
# then, the assert below is commented and it might happen that two
# instances actually exist (which should not be an issue unless someone
# does a comparison with the 'is' operator).
#assert self is other
return True return True
def __hash__(self): def __hash__(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论