Mark Dickinson added the comment:

This is not easy to avoid, I'm afraid, and it's a consequence of Python's usual 
rules for mixed-type arithmetic:  (-0-0j) is interpreted as 0 - (0.0 + 0.0j) 
--- that is, the 0j is promoted to a complex instance (by giving it zero real 
part) before the subtraction is performed.  Then the real part of the result is 
computed as 0.0 - 0.0, which is 0.0.  Note that the first 0.0 comes from 
converting the *integer* 0 to a complex number.  If you do -0.0-0.0j you'll see 
a different result:

>>> -0.0-0.0j
(-0+0j)

----------
resolution:  -> invalid
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17336>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to