[issue41485] Repr of complex number with signed zero does not roundtrip

2020-08-05 Thread Mark Dickinson
Mark Dickinson added the comment: [META] @Eric: No apology needed. I find the issue tracker search hard to use well, and in general we don't do a great job of tracking duplicates properly. I'm trying to be better about that. -- ___ Python tracker

[issue41485] Repr of complex number with signed zero does not roundtrip

2020-08-05 Thread Eric Wieser
Eric Wieser added the comment: Apologies for not searching the issue tracker effectively until after filing this. -- ___ Python tracker ___

[issue41485] Repr of complex number with signed zero does not roundtrip

2020-08-05 Thread Mark Dickinson
Mark Dickinson added the comment: Closing here; to the extent that it's possible, let's keep the discussion in one place (comments can still be posted on closed issues). I'll add a comment on #17336. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder:

[issue41485] Repr of complex number with signed zero does not roundtrip

2020-08-05 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41485] Repr of complex number with signed zero does not roundtrip

2020-08-05 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This is a known issue and I have a PR that does this that I could post but it was rejected when it was previously discussed: https://bugs.python.org/issue23229#msg233963 -- ___ Python tracker

[issue41485] Repr of complex number with signed zero does not roundtrip

2020-08-05 Thread Rémi Lapeyre
Change by Rémi Lapeyre : -- nosy: +remi.lapeyre versions: +Python 3.10, Python 3.9 ___ Python tracker ___ ___ Python-bugs-list

[issue41485] Repr of complex number with signed zero does not roundtrip

2020-08-05 Thread Eric Wieser
Eric Wieser added the comment: This was reported and closed in https://bugs.python.org/issue17336, but it seems to me that this is easy to avoid - have `__repr__` return `complex(...)` for values which do not round-trip. -- ___ Python tracker

[issue41485] Repr of complex number with signed zero does not roundtrip

2020-08-05 Thread Eric Wieser
New submission from Eric Wieser : Python distinguishes signed zeros by their repr: # floats >>> 0.0 0.0 >>> -0.0 -0.0 # complex >>> complex(0.0, 0.0) # A 0j >>> complex(0.0, -0.0) # B -0j >>> complex(-0.0, 0.0) # C (-0+0j) >>> complex(-0.0, -0.0) # D (-0+0j) However, only one of these