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.smith
Recipients docs@python, eric.smith, lebigot
Date 2014-04-10.13:18:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1397135928.65.0.475423333041.issue21195@psf.upfronthosting.co.za>
In-reply-to
Content
An empty format specifier can (and to my knowledge, does) match str(). So you get:

>>> format(1e10, '')
'10000000000.0'
>>> format(1e10, 'g')
'1e+10'
>>> str(1e10)
'10000000000.0'

The SO question is asking about an empty "presentation type", which is indeed similar to 'g' for floats.

I think this is all the same in 2.7 and 3.4, with the exception of how str() might operate on floats.
History
Date User Action Args
2014-04-10 13:18:48eric.smithsetrecipients: + eric.smith, lebigot, docs@python
2014-04-10 13:18:48eric.smithsetmessageid: <1397135928.65.0.475423333041.issue21195@psf.upfronthosting.co.za>
2014-04-10 13:18:48eric.smithlinkissue21195 messages
2014-04-10 13:18:48eric.smithcreate