Make Fraction(-1).__hash__() return -2 rather than -1 (see issue 10356).
diff --git a/Lib/fractions.py b/Lib/fractions.py
index 51e67e2..8be52d2 100644
--- a/Lib/fractions.py
+++ b/Lib/fractions.py
@@ -528,12 +528,8 @@
             return Fraction(round(self / shift) * shift)
 
     def __hash__(self):
-        """hash(self)
+        """hash(self)"""
 
-        Tricky because values that are exactly representable as a
-        float must have the same hash as that float.
-
-        """
         # XXX since this method is expensive, consider caching the result
 
         # In order to make sure that the hash of a Fraction agrees
@@ -550,7 +546,8 @@
             hash_ = _PyHASH_INF
         else:
             hash_ = abs(self._numerator) * dinv % _PyHASH_MODULUS
-        return hash_ if self >= 0 else -hash_
+        result = hash_ if self >= 0 else -hash_
+        return -2 if result == -1 else result
 
     def __eq__(a, b):
         """a == b"""
diff --git a/Lib/test/test_fractions.py b/Lib/test/test_fractions.py
index a41fd9c..c28f06c 100644
--- a/Lib/test/test_fractions.py
+++ b/Lib/test/test_fractions.py
@@ -546,6 +546,9 @@
         self.assertEquals(hash(2.5), hash(F(5, 2)))
         self.assertEquals(hash(10**50), hash(F(10**50)))
         self.assertNotEquals(hash(float(10**23)), hash(F(10**23)))
+        # Check that __hash__ produces the same value as hash(), for
+        # consistency with int and Decimal.  (See issue #10356.)
+        self.assertEquals(hash(F(-1)), F(-1).__hash__())
 
     def testApproximatePi(self):
         # Algorithm borrowed from