__hash__像这样实施是个坏主意吗?
__hash__
class XYZ: def __init__(self): self.val = None def __hash__(self): return id(self)
我是否设置了一些潜在的灾难性的东西?
python hash
hash ×1
python ×1