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 mark.dickinson
Recipients eric.smith, mark.dickinson
Date 2009-04-27.20:45:02
SpamBayes Score 2.6032372e-09
Marked as misclassified No
Message-id <>
In all current versions of Python, the str or repr of a float always 
includes *either* an exponent, or a decimal point and at least one digit 
after the decimal point.

I propose making the str or repr of a complex number behave in the same 
way.  That is, instead of

>>> 2+4j

we'd have:

>>> 2+4j

The aims are to make complex representation more consistent with float 
representation, retain the visual reminder that the pieces of a complex 
number are floats (to me, 2+4j looks like a Gaussian integer rather than 
a complex number), simplify the implementation a little, and remove the 
ugliness where floats switch from normal to exponential notation at 
1e11, but complex numbers switch at 1e12.


for some additional discussion.
Date User Action Args
2009-04-27 20:45:10mark.dickinsonsetrecipients: + mark.dickinson, eric.smith
2009-04-27 20:45:08mark.dickinsonsetmessageid: <>
2009-04-27 20:45:04mark.dickinsonlinkissue5858 messages
2009-04-27 20:45:02mark.dickinsoncreate