提交 591d476f 编写于 作者: T Tzu-ping Chung

Note on why we don't implement equality

上级 018c051a
......@@ -420,6 +420,10 @@ class RequiresPythonCandidate(Candidate):
version_info = sys.version_info[:3]
self._version = Version(".".join(str(c) for c in version_info))
# We don't need to implement __eq__() and __ne__() since there is always
# only one RequiresPythonCandidate in a resolution, i.e. the host Python.
# The built-in object.__eq__() and object.__ne__() do exactly what we want.
@property
def name(self):
# type: () -> str
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册