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 rhettinger
Recipients josh.r, mark.dickinson, rhettinger, rushilu
Date 2020-04-13.01:46:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1586742415.87.0.104476192401.issue40269@roundup.psfhosted.org>
In-reply-to
Content
The docs for complex literals¹ could be improved to show that:

    -1j is interpreted as -complex(0.0, 1.0)
    giving a real component of -0.0
    and an imaginary component of -1.0

and that:

   0-1j  is interpreted as 0.0-complex(0.0, 1.0)
    giving a real component of 0.0
    and an imaginary component of -1.0

It is unfortunate the repr for complex numbers uses integers at all.  That hides what is going on.

¹ https://docs.python.org/3/reference/lexical_analysis.html#imaginary-literals
History
Date User Action Args
2020-04-13 01:46:55rhettingersetrecipients: + rhettinger, mark.dickinson, josh.r, rushilu
2020-04-13 01:46:55rhettingersetmessageid: <1586742415.87.0.104476192401.issue40269@roundup.psfhosted.org>
2020-04-13 01:46:55rhettingerlinkissue40269 messages
2020-04-13 01:46:55rhettingercreate