This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients Haoyu SUN, eric.smith, mark.dickinson, rhettinger
Date 2020-05-18.06:48:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1589784482.52.0.439994429676.issue40633@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2020-05-18 06:48:02mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, eric.smith, Haoyu SUN
2020-05-18 06:48:02mark.dickinsonsetmessageid: <1589784482.52.0.439994429676.issue40633@roundup.psfhosted.org>
2020-05-18 06:48:02mark.dickinsonlinkissue40633 messages
2020-05-18 06:48:02mark.dickinsoncreate