This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Eric Wieser
Recipients Eric Wieser
Date 2020-08-05.09:05:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1596618328.49.0.282649932671.issue41485@roundup.psfhosted.org>
In-reply-to
Content
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 `complex` reprs round-trips:

>>> 0j   # ok
0j
>>> -0j   # doesn't round-trip
(-0-0j)
>>> (-0+0j)  # doesn't round-trip
0j
>>> (-0-0j)
0j
History
Date User Action Args
2020-08-05 09:05:28Eric Wiesersetrecipients: + Eric Wieser
2020-08-05 09:05:28Eric Wiesersetmessageid: <1596618328.49.0.282649932671.issue41485@roundup.psfhosted.org>
2020-08-05 09:05:28Eric Wieserlinkissue41485 messages
2020-08-05 09:05:28Eric Wiesercreate