]> granicus.if.org Git - python/commitdiff
Define a __hash__ to quiet down a -3 warning
authorDonald Stufft <donald@stufft.io>
Tue, 11 Nov 2014 17:32:57 +0000 (12:32 -0500)
committerDonald Stufft <donald@stufft.io>
Tue, 11 Nov 2014 17:32:57 +0000 (12:32 -0500)
Lib/test/_mock_backport.py

index d33edccf02332ca2ebdcdb9713837a517d0805be..d3948310bbafd99d90cfecfd819c625ed7979f41 100644 (file)
@@ -1873,6 +1873,8 @@ class MagicProxy(object):
 class _ANY(object):
     "A helper object that compares equal to everything."
 
+    __hash__ = object.__hash__
+
     def __eq__(self, other):
         return True
 
@@ -1923,6 +1925,9 @@ class _Call(tuple):
 
     If the _Call has no name then it will match any name.
     """
+
+    __hash__ = object.__hash__
+
     def __new__(cls, value=(), name=None, parent=None, two=False,
                 from_kall=True):
         name = ''