diff -r 7ed9c601accd Modules/_pickle.c --- a/Modules/_pickle.c Fri Feb 06 09:59:05 2015 -0800 +++ b/Modules/_pickle.c Sun Feb 08 10:55:18 2015 +0200 @@ -1979,7 +1979,7 @@ if (_Pickler_Write(self, &op, 1) < 0) goto done; - buf = PyOS_double_to_string(x, 'g', 17, 0, NULL); + buf = PyOS_double_to_string(x, 'r', 0, Py_DTSF_ADD_DOT_0, NULL); if (!buf) { PyErr_NoMemory(); goto done;