Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23096
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23096
___
Roundup Robot added the comment:
New changeset 8c9121993eb5 by Serhiy Storchaka in branch 'default':
Issue #23096: Pickle representation of floats with protocol 0 now is the same
https://hg.python.org/cpython/rev/8c9121993eb5
--
nosy: +python-dev
___
Serhiy Storchaka added the comment:
Here is a patch.
--
keywords: +patch
stage: - patch review
versions: -Python 2.7, Python 3.4
Added file: http://bugs.python.org/file38039/pickle_float_repr.patch
___
Python tracker rep...@bugs.python.org
Alexandre Vassalotti added the comment:
The repr for floats was changed some time ago to use a shorter decimal strings
when possible. Both representations should yield the same float value once
decoded. If we want to make the C and Python implementations of pickle
consistent, then we should
Antoine Pitrou added the comment:
This looks less like a bug than an enhancement request.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23096
___
New submission from Serhiy Storchaka:
Python and C implementations of pickle produce different results when pickle
floats with protocol 0.
pickle.dumps(4.2, 0)
b'F4.2002\n.'
pickle._dumps(4.2, 0)
b'F4.2\n.'
--
components: Library (Lib)
messages: 232992
nosy:
Serhiy Storchaka added the comment:
Python implementation uses repr(value) and C implementation uses '%.17g' %
value.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23096
___