comparison mercurial/upgrade.py @ 40997:038108a9811c

upgrade: correct implementation of improvement.__ne__ The "not" operator binds more closely than "==": >>> not False == False False
author Benjamin Peterson <benjamin@python.org>
date Thu, 13 Dec 2018 23:20:28 -0800
parents 3764330f76a6
children 5608b5a6c323
comparison
equal deleted inserted replaced
40996:6f2510b581a0 40997:038108a9811c
140 # This is what python tell use to do 140 # This is what python tell use to do
141 return NotImplemented 141 return NotImplemented
142 return self.name == other.name 142 return self.name == other.name
143 143
144 def __ne__(self, other): 144 def __ne__(self, other):
145 return not self == other 145 return not (self == other)
146 146
147 def __hash__(self): 147 def __hash__(self):
148 return hash(self.name) 148 return hash(self.name)
149 149
150 allformatvariant = [] 150 allformatvariant = []