From: Robert Bradshaw Date: Sat, 31 Oct 2009 20:52:55 +0000 (-0700) Subject: complex number coercion fix X-Git-Tag: 0.12.alpha0~8^2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a32b90c2293567b4b132ba0031976e583ae3d115;p=cython.git complex number coercion fix --- diff --git a/Cython/Compiler/PyrexTypes.py b/Cython/Compiler/PyrexTypes.py index e7ffb1d7..4ca7f3d5 100644 --- a/Cython/Compiler/PyrexTypes.py +++ b/Cython/Compiler/PyrexTypes.py @@ -882,6 +882,12 @@ class CComplexType(CNumericType): return self.real_type == other.real_type else: return False + + def __ne__(self, other): + if isinstance(self, CComplexType) and isinstance(other, CComplexType): + return self.real_type != other.real_type + else: + return True def __lt__(self, other): if isinstance(self, CComplexType) and isinstance(other, CComplexType):