Home | History | Annotate | Download | only in python2.7

Lines Matching refs:Complex

300                 # float and complex don't have those operations, but we
304 elif isinstance(other, complex):
305 return complex(self) + other
318 elif isinstance(other, Complex):
319 return complex(other) + complex(self)
325 refer to Fraction, float, or complex as "boilerplate". 'r'
328 Complex. The first three involve 'r + b':
330 1. If B <: Fraction, int, float, or complex, we handle
343 Complex.
365 elif isinstance(b, complex):
366 return fallback_operator(complex(a), b)
378 elif isinstance(a, numbers.Complex):
379 return fallback_operator(complex(a), complex(b))
454 If b is not an integer, the result will be a float or complex
532 if isinstance(b, numbers.Complex) and b.imag == 0:
560 # comparisons with complex should raise a TypeError, for consistency
561 # with int<->complex, float<->complex, and complex<->complex comparisons.
562 if isinstance(other, complex):
563 raise TypeError("no ordering relation is defined for complex numbers")