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-17.10:32:51
SpamBayes Score 6.576628e-11
Marked as misclassified No
Message-id <1239964374.11.0.815428814709.issue5780@psf.upfronthosting.co.za>
In-reply-to
Content
After:

 CC="gcc -DPY_NO_SHORT_FLOAT_REPR" ./configure && make

test_format_testfile in test_float fails with:

test.support.TestFailed: Traceback (most recent call last):
  File "Lib/test/test_float.py", line 341, in test_format_testfile
    self.assertEqual(fmt % float(arg), rhs)
AssertionError: '100000000000.0' != '1e+11'

The problem is that for str(float), the new formatting code switches to 
exponential notation at 1e11, not 1e12; the legacy code does not.

A similar issue exists for repr: repr(1e16) should now produce '1e+16'.
History
Date User Action Args
2009-04-17 10:32:54mark.dickinsonsetrecipients: + mark.dickinson, eric.smith
2009-04-17 10:32:54mark.dickinsonsetmessageid: <1239964374.11.0.815428814709.issue5780@psf.upfronthosting.co.za>
2009-04-17 10:32:52mark.dickinsonlinkissue5780 messages
2009-04-17 10:32:51mark.dickinsoncreate