Author gvanrossum
Recipients gvanrossum, mark
Date 2007-12-11.17:56:41
SpamBayes Score 0.112026
Marked as misclassified No
Message-id <1197395801.26.0.835562491899.issue1588@psf.upfronthosting.co.za>
In-reply-to
Content
This really is a feature request -- in Python 2.x there is no formatting
code for complex numbers at all, and "%.5s" % complex(...) does the same
thing.

I agree it would be neat to have control over complex numbers using the
same formatting language used for floats; but I note that it's easy
enough to do this manually, e.g.

>>> "{0.real:.5}+{0.imag:.5}j".format(z)
'1+0.66667j'
History
Date User Action Args
2007-12-11 17:56:41gvanrossumsetspambayes_score: 0.112026 -> 0.112026
recipients: + gvanrossum, mark
2007-12-11 17:56:41gvanrossumsetspambayes_score: 0.112026 -> 0.112026
messageid: <1197395801.26.0.835562491899.issue1588@psf.upfronthosting.co.za>
2007-12-11 17:56:41gvanrossumlinkissue1588 messages
2007-12-11 17:56:41gvanrossumcreate