[pypy-svn] r76826 - pypy/trunk/pypy/interpreter

arigo at codespeak.net arigo at codespeak.net
Wed Sep 1 20:07:37 CEST 2010


Author: arigo
Date: Wed Sep  1 20:07:34 2010
New Revision: 76826

Modified:
   pypy/trunk/pypy/interpreter/argument.py
Log:
Fix Signature.__eq__().


Modified: pypy/trunk/pypy/interpreter/argument.py
==============================================================================
--- pypy/trunk/pypy/interpreter/argument.py	(original)
+++ pypy/trunk/pypy/interpreter/argument.py	Wed Sep  1 20:07:34 2010
@@ -52,11 +52,15 @@
                 self.argnames, self.varargname, self.kwargname)
 
     def __eq__(self, other):
+        if not isinstance(other, Signature):
+            return NotImplemented
         return (self.argnames == other.argnames and
                 self.varargname == other.varargname and
                 self.kwargname == other.kwargname)
 
     def __ne__(self, other):
+        if not isinstance(other, Signature):
+            return NotImplemented
         return not self == other
 
 



More information about the Pypy-commit mailing list