On Wed, Jun 17, 2020, 1:30 AM Steven D'Aprano <st...@pearwood.info> wrote:

> What exactly is getting in the way here? Standards do change. One standard
> (JSON) is not capable of representing all values from another standard
> (IEEE-754). Removing NANs and INFs would break floating point software
> everywhere, and a lot of hardware too. Adding support for them to JSON
> would be an enhancement, not a breakage.


I can't speak for Guido, of course. But it seems to me that changing the
JSON standard used by many languages and libraries, would be a long uphill
walk. Not because it's perfect, but simply because there is a lot of
institutional inertia and varying interested parties.

That said, Python is far from alone in supporting "JSON+" as an informal
extension that adds +/-Infinity and NaN. Those balls are definitely work
having available.

I think the argument 'allow_nan' is poorly spelled. Spelling it 'strict'
would have been much better. Maybe 'conformant'. I'm not sure I hate the
spelling enough to propose a change with depreciation period, but I
certainly wouldn't oppose that.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/PZ56EUB3L4XLHESU74CNDDLQQMQFG62Q/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to