def __eq__(self, other):
"""
Determine whether two objects are equal.
:other: other object
:returns: boolean
"""
return type(self) == type(other) and len(self) == len(other) and \
reduce(__and__, map(lambda z: z[0] == z[1], zip(self, other)), True)
评论列表
文章目录