]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40780: Fix failure of _Py_dg_dtoa to remove trailing zeros (GH-20435) (GH-20514)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 29 May 2020 13:46:54 +0000 (06:46 -0700)
committerGitHub <noreply@github.com>
Fri, 29 May 2020 13:46:54 +0000 (14:46 +0100)
commitad088ca5c6adc4a107411cad62b83f5c6e06b5ed
tree35c19a74a3333a3353de34d6b01cda6efb8dfb72
parent8fcc1474ef5d819c144309e048e71e6013544063
bpo-40780: Fix failure of _Py_dg_dtoa to remove trailing zeros (GH-20435) (GH-20514)

* Fix failure of _Py_dg_dtoa to remove trailing zeros

* Add regression test and news entry

* Add explanation about why it's safe to strip trailing zeros

* Make code safer, clean up comments, add change note at top of file

* Nitpick: avoid implicit int-to-float conversion in tests
(cherry picked from commit 895c9c1d438367722f74f437fda96767d770662b)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
Lib/test/test_format.py
Misc/NEWS.d/next/Core and Builtins/2020-05-26-17-43-58.bpo-40780.3Ckdgm.rst [new file with mode: 0644]
Python/dtoa.c