Mark Dickinson <dicki...@gmail.com> added the comment:

> We could add an option to cause NaNs to raise an error, but I don't think it 
> would get used.

If that option were extended to also cause infinities to raise an error, then 
I'd use it. We have code that's producing JSON without knowing in advance 
exactly who the JSON consumer will be, and in particular whether the consumer 
will be strict in what it accepts or not. In that situation, it's preferable 
for us to discover that we're producing invalid JSON early (e.g., when running 
our own unit tests) rather than much later, when it turns out that the customer 
is using the "wrong" relational database.

----------

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

Reply via email to