[issue27363] Complex with negative zero imaginary part

R. David Murray report at bugs.python.org
Fri Jun 24 10:39:34 EDT 2016


R. David Murray added the comment:

That's a good point; however the goal of the "repr invariant" is to be able to losslessly reproduce the object when possible.  The fact that you have to use the complex constructor to do that is unfortunate, but is a consequence of the underlying problem.  I suspect that literal_eval, on the other hand, should reproduce what the interpreter does, but since I think it already doesn't do that 100% (though I can't offhand remember what makes me think that) perhaps that is a possibility.  I'll reopen the issue to discuss that.

----------
resolution: rejected -> 
stage: resolved -> 
status: closed -> open

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27363>
_______________________________________


More information about the Python-bugs-list mailing list