Make Label() object hashable

Since it got custom __eq__ function, __hash__ needs to be implemented
too. Otherwise it can't be used as a key in dict.
这个提交包含在:
Marek Marczykowski-Górecki 2020-07-29 03:50:11 +02:00
父节点 60d28dc13a
当前提交 a078e1f617
找不到此签名对应的密钥
GPG 密钥 ID: 063938BA42CFA724

查看文件

@ -80,3 +80,6 @@ class Label(object):
if isinstance(other, Label):
return self.name == other.name
return NotImplemented
def __hash__(self):
return hash(self.name)