Issue #9337: Make float.__str__ identical to float.__repr__.

(And similarly for complex numbers.)
This commit is contained in:
Mark Dickinson 2010-08-04 20:56:28 +00:00
parent b6c5074920
commit 388122d43b
10 changed files with 63 additions and 85 deletions

View file

@ -598,11 +598,11 @@ def decistmt(s):
The format of the exponent is inherited from the platform C library.
Known cases are "e-007" (Windows) and "e-07" (not Windows). Since
we're only showing 12 digits, and the 13th isn't close to 5, the
we're only showing 11 digits, and the 12th isn't close to 5, the
rest of the output should be platform-independent.
>>> exec(s) #doctest: +ELLIPSIS
-3.21716034272e-0...7
-3.2171603427...e-0...7
Output from calculations with Decimal should be identical across all
platforms.