On 10/10/2013 16:51, Neil Cerutti wrote:
[...]

Mixed arithmetic always promotes to the wider type (except in
the case of complex numbers (Ha!)).

r == c is equivalent to r == abs(c), which returns the magintude
of the complex number.

What?

>>> -1 == -1 + 0j
True
>>> -1 == abs(-1 + 0j)
False
>>> 1 == 0 + 1j
False
>>> 1 == abs(0 + 1j)
True
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to