On Sat, Sep 5, 2020 at 7:26 PM Greg Ewing <[email protected]>
wrote:

> On 6/09/20 8:08 am, David Mertz wrote:
> > The only real goal I've seen is that you hope that `x == eval(repr(x))`
> > for floating point numbers.  But that is doomed to failure since it
> > cannot work for NaN by its very definition.
>
> I think that just means the definition needs a bit more finesse.
> It would be a reasonable goal for it to give back *some* NaN
> with the same flags and payload as the original.
>

Sure, but we have that already:

>>> from math import inf, nan
>>> eval(repr([42, nan, inf]))
[42, nan, inf]

The only difference is the `math` namespace vs `builtins` namespace.

-- 
The dead increasingly dominate and strangle both the living and the
not-yet born.  Vampiric capital and undead corporate persons abuse
the lives and control the thoughts of homo faber. Ideas, once born,
become abortifacients against new conceptions.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/HP5R24IXRL5LST3OQWWNNTALHLUCIVUN/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to