equal
deleted
inserted
replaced
40 """The domain part of the address *local-part@domain*""" |
40 """The domain part of the address *local-part@domain*""" |
41 return self._domainname |
41 return self._domainname |
42 |
42 |
43 def __eq__(self, other): |
43 def __eq__(self, other): |
44 if isinstance(other, self.__class__): |
44 if isinstance(other, self.__class__): |
45 return self._localpart == other.localpart and \ |
45 return self._localpart == other._localpart and \ |
46 self._domainname == other.domainname |
46 self._domainname == other._domainname |
47 return NotImplemented |
47 return NotImplemented |
48 |
48 |
49 def __ne__(self, other): |
49 def __ne__(self, other): |
50 if isinstance(other, self.__class__): |
50 if isinstance(other, self.__class__): |
51 return self._localpart != other.localpart or \ |
51 return self._localpart != other._localpart or \ |
52 self._domainname != other.domainname |
52 self._domainname != other._domainname |
53 return NotImplemented |
53 return NotImplemented |
54 |
54 |
55 def __hash__(self): |
55 def __hash__(self): |
56 return hash((self._localpart.lower(), self._domainname.lower())) |
56 return hash((self._localpart.lower(), self._domainname.lower())) |
57 |
57 |