Mark Dickinson added the comment:

Note that this will also change the results for JSON output of NumPy float64 
values, so at the very least I'd expect this change to break (admittedly poorly 
written) unit tests / doctests.

Python 2.7.12 (default, Jul 10 2016, 18:28:23) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> import json
>>> x = np.float64(3.3)
>>> json.dumps(x)
'3.2999999999999998'
>>> repr(x)
'3.2999999999999998'
>>> float.__repr__(x)
'3.3'

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27934>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to