New submission from Or <orsh...@outlook.com>:
when dumping a value coming from numpy.random.choice([True,False]) the exception raised is very unclear. json.dumps(result) File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/encoder.py", line 184, in default raise TypeError(repr(o) + " is not JSON serializable") which prints "True is not JSON serializable" - but it should actually print "<type 'numpy.bool_'> is not JSON serializable". ---------- components: Library (Lib) messages: 331632 nosy: orshemy priority: normal severity: normal status: open title: json.dumps very unclear exception type: behavior versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35464> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com