Index: twisted/internet/defer.py
===================================================================
--- twisted/internet/defer.py	(revision 28467)
+++ twisted/internet/defer.py	(working copy)
@@ -239,8 +239,8 @@
 
         These will be executed when the 'master' callback is run.
         """
-        assert callable(callback)
-        assert errback == None or callable(errback)
+        assert hasattr(callback, '__call__')
+        assert errback is None or hasattr(errback, '__call__')
         cbs = ((callback, callbackArgs, callbackKeywords),
                (errback or (passthru), errbackArgs, errbackKeywords))
         self.callbacks.append(cbs)
@@ -570,24 +570,18 @@
         """
         return 'FirstError[#%d, %s]' % (self.index, self.subFailure)
 
-
-    def __cmp__(self, other):
-        """
-        Comparison between L{FirstError} and other L{FirstError} instances
-        is defined as the comparison of the index and sub-failure of each
-        instance.  L{FirstError} instances don't compare equal to anything
-        that isn't a L{FirstError} instance.
-
-        @since: 8.2
-        """
+    def __eq__(self, other):
         if isinstance(other, FirstError):
-            return cmp(
-                (self.index, self.subFailure),
-                (other.index, other.subFailure))
-        return -1
+            return (self.index, self.subFailure) == (other.index, other.subFailure)
+        else:
+            return False
 
+    def __ne__(self,other):
+        return not self.__eq__(other)
 
+    __hash__ =  object.__hash__
 
+
 class DeferredList(Deferred):
     """
     I combine a group of deferreds into one callback.
