mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Issue 2235: Py3k warnings are now emitted for classes that will no longer inherit a__hash__ implementation from a parent class in Python 3.x. The standard library and test suite have been updated to not emit these warnings.
This commit is contained in:
parent
f8d62d23e9
commit
48361f5cbf
18 changed files with 165 additions and 18 deletions
|
|
@ -25,6 +25,7 @@ class UserList(collections.MutableSequence):
|
|||
else: return other
|
||||
def __cmp__(self, other):
|
||||
return cmp(self.data, self.__cast(other))
|
||||
__hash__ = None # Mutable sequence, so not hashable
|
||||
def __contains__(self, item): return item in self.data
|
||||
def __len__(self): return len(self.data)
|
||||
def __getitem__(self, i): return self.data[i]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue